From e5bf838c839bf1c66b398b719bebacb64a02f2eb Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Thu, 28 Jul 2022 21:02:12 -0700 Subject: [PATCH] Fix metacluster register command hints, fix bug in cluster registration on retries, extend the length of the tenant management concurrency test --- fdbcli/MetaclusterCommands.actor.cpp | 10 +++++----- .../include/fdbclient/MetaclusterManagement.actor.h | 1 + .../TenantManagementConcurrencyWorkload.actor.cpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fdbcli/MetaclusterCommands.actor.cpp b/fdbcli/MetaclusterCommands.actor.cpp index fcaf24783d..6a47b3829b 100644 --- a/fdbcli/MetaclusterCommands.actor.cpp +++ b/fdbcli/MetaclusterCommands.actor.cpp @@ -385,11 +385,11 @@ std::vector metaclusterHintGenerator(std::vector const& return { "" }; } else if (tokencmp(tokens[1], "decommission")) { return {}; - } else if (tokencmp(tokens[1], "register")) { - static std::vector opts = { - "", "|connection_string=>" - }; - return std::vector(opts.begin() + std::min(1, tokens.size() - 2), opts.end()); + } else if (tokencmp(tokens[1], "register") && tokens.size() < 5) { + static std::vector opts = { "", + "connection_string=", + "[max_tenant_groups=]" }; + return std::vector(opts.begin() + tokens.size() - 2, opts.end()); } else if (tokencmp(tokens[1], "remove") && tokens.size() < 4) { static std::vector opts = { "[FORCE]", "" }; if (tokens.size() == 2) { diff --git a/fdbclient/include/fdbclient/MetaclusterManagement.actor.h b/fdbclient/include/fdbclient/MetaclusterManagement.actor.h index 2976f6fe16..70b9f4317f 100644 --- a/fdbclient/include/fdbclient/MetaclusterManagement.actor.h +++ b/fdbclient/include/fdbclient/MetaclusterManagement.actor.h @@ -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(); } } diff --git a/fdbserver/workloads/TenantManagementConcurrencyWorkload.actor.cpp b/fdbserver/workloads/TenantManagementConcurrencyWorkload.actor.cpp index af38fe6e6f..3e53ba5530 100644 --- a/fdbserver/workloads/TenantManagementConcurrencyWorkload.actor.cpp +++ b/fdbserver/workloads/TenantManagementConcurrencyWorkload.actor.cpp @@ -50,7 +50,7 @@ struct TenantManagementConcurrencyWorkload : TestWorkload { TenantManagementConcurrencyWorkload(WorkloadContext const& wcx) : TestWorkload(wcx) { maxTenants = std::min(1e8 - 1, getOption(options, "maxTenants"_sr, 100)); maxTenantGroups = std::min(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();