mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
Fix metacluster register command hints, fix bug in cluster registration on retries, extend the length of the tenant management concurrency test
This commit is contained in:
parent
e8e4f3ad3a
commit
e5bf838c83
@ -385,11 +385,11 @@ std::vector<const char*> metaclusterHintGenerator(std::vector<StringRef> const&
|
||||
return { "<NAME>" };
|
||||
} else if (tokencmp(tokens[1], "decommission")) {
|
||||
return {};
|
||||
} else if (tokencmp(tokens[1], "register")) {
|
||||
static std::vector<const char*> opts = {
|
||||
"<NAME>", "<max_tenant_groups=<NUM_GROUPS>|connection_string=<CONNECTION_STRING>>"
|
||||
};
|
||||
return std::vector<const char*>(opts.begin() + std::min<int>(1, tokens.size() - 2), opts.end());
|
||||
} else if (tokencmp(tokens[1], "register") && tokens.size() < 5) {
|
||||
static std::vector<const char*> opts = { "<NAME>",
|
||||
"connection_string=<CONNECTION_STRING>",
|
||||
"[max_tenant_groups=<NUM_GROUPS>]" };
|
||||
return std::vector<const char*>(opts.begin() + tokens.size() - 2, opts.end());
|
||||
} else if (tokencmp(tokens[1], "remove") && tokens.size() < 4) {
|
||||
static std::vector<const char*> opts = { "[FORCE]", "<NAME>" };
|
||||
if (tokens.size() == 2) {
|
||||
|
@ -603,6 +603,7 @@ struct RegisterClusterImpl {
|
||||
throw cluster_already_registered();
|
||||
} else {
|
||||
// We already successfully registered the cluster with these details, so there's nothing to do
|
||||
self->clusterEntry.id = existingRegistration.get().id;
|
||||
return Void();
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ struct TenantManagementConcurrencyWorkload : TestWorkload {
|
||||
TenantManagementConcurrencyWorkload(WorkloadContext const& wcx) : TestWorkload(wcx) {
|
||||
maxTenants = std::min<int>(1e8 - 1, getOption(options, "maxTenants"_sr, 100));
|
||||
maxTenantGroups = std::min<int>(2 * maxTenants, getOption(options, "maxTenantGroups"_sr, 20));
|
||||
testDuration = getOption(options, "testDuration"_sr, 60.0);
|
||||
testDuration = getOption(options, "testDuration"_sr, 120.0);
|
||||
|
||||
if (clientId == 0) {
|
||||
useMetacluster = deterministicRandom()->coinflip();
|
||||
|
Loading…
x
Reference in New Issue
Block a user