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:
A.J. Beamon 2022-07-28 21:02:12 -07:00
parent e8e4f3ad3a
commit e5bf838c83
3 changed files with 7 additions and 6 deletions

View File

@ -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) {

View File

@ -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();
}
}

View File

@ -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();