8000 reintroduce --cluster.index-create-timeout for testing (#14678) · arangodb/arangodb@f364629 · GitHub
[go: up one dir, main page]

Skip to content

Commit f364629

Browse files
authored
reintroduce --cluster.index-create-timeout for testing (#14678)
we want the timeout to be configurable for arangosync testing.
1 parent 3d56230 commit f364629

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

CHANGELOG

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ devel
2424
* Do not block a scheduler thread on the coordinator while an index is being
2525
created. Instead, start a background thread for the actual index
2626
fill-up work. The original thread can then be relinquished until the index
27-
is completely filled or index creation has failed. This also allows
28-
obsoleting the startup option `--cluster.index-create-timeout`, which from
29-
now on is ignored when set.
27+
is completely filled or index creation has failed.
28+
The default index creation timeout on coordinators has also been
29+
extended from 1 hour to 4 days, but it is still configurable via the
30+
startup parameter `--cluster.index-create-timeout` in case this is
31+
necessary.
3032

3133
* Fix wrong assertion in fuerte and move it to where the TLA+ model says
3234
it should be. This fixes a unit test failure occurring on newer Macs

arangod/Cluster/ClusterFeature.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@ void ClusterFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {
115115

116116
options->addObsoleteOption("--cluster.agency-prefix", "agency prefix", false);
117117

118-
options->addObsoleteOption("--cluster.index-create-timeout",
119-
"amount of time (in seconds) the coordinator will wait for an index to "
120-
"be created before giving up", true);
121-
122-
123118
options->addOption(
124119
"--cluster.require-persisted-id",
125120
"if set to true, then the instance will only start if a UUID file is "
@@ -223,6 +218,15 @@ void ClusterFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {
223218
arangodb::options::Flags::OnDBServer,
224219
arangodb::options::Flags::Hidden));
225220

221+
options->addOption(
222+
"--cluster.index-create-timeout",
223+
"amount of time (in seconds) the coordinator will wait for an index to "
224+
"be created before giving up",
225+
new DoubleParameter(&_indexCreationTimeout),
226+
arangodb::options::makeFlags(arangodb::options::Flags::DefaultNoComponents,
227+
arangodb::options::Flags::OnCoordinator,
228+
arangodb::options::Flags::Hidden));
229+
226230
options
227231
->addOption("--cluster.api-jwt-policy",
228232
"access permissions required for accessing /_admin/cluster REST APIs "

arangod/Cluster/ClusterFeature.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class ClusterFeature : public application_features::ApplicationFeature {
8686
bool forceOneShard() const { return _forceOneShard; }
8787
/// @brief index creation timeout in seconds. note: this used to be
8888
/// a configurable parameter in previous versions, but is now hard-coded.
89-
double indexCreationTimeout() const noexcept { return 72.0 * 3600.0; }
89+
double indexCreationTimeout() const { return _indexCreationTimeout; }
9090

9191
std::shared_ptr<HeartbeatThread> heartbeatThread();
9292

@@ -170,6 +170,8 @@ class ClusterFeature : public application_features::ApplicationFeature {
170170
bool _unregisterOnShutdown = false;
171171
bool _enableCluster = false;
172172
bool _requirePersistedId = false;
173+
/// @brief coordinator timeout for index creation. defaults to 4 days
174+
double _indexCreationTimeout = 72.0 * 3600.0;
173175
std::unique_ptr<ClusterInfo> _clusterInfo;
174176
std::shared_ptr<HeartbeatThread> _heartbeatThread;
175177
std::unique_ptr<AgencyCache> _agencyCache;

0 commit comments

Comments
 (0)
0