8000 reintroduce --cluster.index-create-timeout for testing by jsteemann · Pull Request #14679 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

reintroduce --cluster.index-create-timeout for testing #14679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ v3.8.1 (XXXX-XX-XX)
* Do not block a scheduler thread on the coordinator while an index is being
created. Instead, start a background thread for the actual index fill-up work.
The original thread can then be relinquished until the index is completely
filled or index creation has failed. This also allows obsoleting the startup
option `--cluster.index-create-timeout`, which from now on is ignored when
set.
filled or index creation has failed.
The default index creation timeout on coordinators has also been extended from
1 hour to 4 days, but it is still configurable via the startup parameter
`--cluster.index-create-timeout` in case this is necessary.

* Fixed: getResponsibleShard call on disjoint Smart Graphs if you asked for the
responsible shard on a disjoint edge collection where the _from and _to differ
Expand Down
14 changes: 9 additions & 5 deletions arangod/Cluster/ClusterFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ void ClusterFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {

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

options->addObsoleteOption("--cluster.index-create-timeout",
"amount of time (in seconds) the coordinator will wait for an index to "
"be created before giving up", true);


options->addOption(
"--cluster.require-persisted-id",
"if set to true, then the instance will only start if a UUID file is "
Expand Down Expand Up @@ -223,6 +218,15 @@ void ClusterFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {
arangodb::options::Flags::OnDBServer,
arangodb::options::Flags::Hidden));

options->addOption(
"--cluster.index-create-timeout",
"amount of time (in seconds) the coordinator will wait for an index to "
"be created before giving up",
new DoubleParameter(&_indexCreationTimeout),
arangodb::options::makeFlags(arangodb::options::Flags::DefaultNoComponents,
arangodb::options::Flags::OnCoordinator,
arangodb::options::Flags::Hidden));

options
->addOption("--cluster.api-jwt-policy",
"access permissions required for accessing /_admin/cluster REST APIs "
Expand Down
4 changes: 3 additions & 1 deletion arangod/Cluster/ClusterFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ClusterFeature : public application_features::ApplicationFeature {
bool forceOneShard() const { return _forceOneShard; }
/// @brief index creation timeout in seconds. note: this used to be
/// a configurable parameter in previous versions, but is now hard-coded.
double indexCreationTimeout() const noexcept { return 72.0 * 3600.0; }
double indexCreationTimeout() const { return _indexCreationTimeout; }

std::shared_ptr<HeartbeatThread> heartbeatThread();

Expand Down Expand Up @@ -171,6 +171,8 @@ class ClusterFeature : public application_features::ApplicationFeature {
bool _unregisterOnShutdown = false;
bool _enableCluster = false;
bool _requirePersistedId = false;
/// @brief coordinator timeout for index creation. defaults to 4 days
double _indexCreationTimeout = 72.0 * 3600.0;
std::unique_ptr<ClusterInfo> _clusterInfo;
std::shared_ptr<HeartbeatThread> _heartbeatThread;
std::unique_ptr<AgencyCache> _agencyCache;
Expand Down
0