Skip to content

Commit

Permalink
Merge pull request #8314 from sfc-gh-ajbeamon/metacluster-management-…
Browse files Browse the repository at this point in the history
…workload-expansion

Improve Metacluster Management Workload
  • Loading branch information
sfc-gh-abeamon authored Sep 26, 2022
2 parents 215f23f + b0c3534 commit 1b8512e
Show file tree
Hide file tree
Showing 2 changed files with 301 additions and 44 deletions.
13 changes: 10 additions & 3 deletions fdbclient/include/fdbclient/MetaclusterManagement.actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ struct ConfigureTenantImpl {
// Removing a tenant group is only possible if we have capacity for more groups on the current cluster
else if (!desiredGroup.present()) {
if (!self->ctx.dataClusterMetadata.get().entry.hasCapacity()) {
throw metacluster_no_capacity();
throw cluster_no_capacity();
}

wait(managementClusterRemoveTenantFromGroup(
Expand All @@ -1625,7 +1625,7 @@ struct ConfigureTenantImpl {
// If we are creating a new tenant group, we need to have capacity on the current cluster
if (!tenantGroupEntry.present()) {
if (!self->ctx.dataClusterMetadata.get().entry.hasCapacity()) {
throw metacluster_no_capacity();
throw cluster_no_capacity();
}
wait(managementClusterRemoveTenantFromGroup(
tr, self->tenantName, tenantEntry, &self->ctx.dataClusterMetadata.get()));
Expand All @@ -1645,7 +1645,14 @@ struct ConfigureTenantImpl {

// We don't currently support movement between groups on different clusters
else {
throw cluster_no_capacity();
TraceEvent("TenantGroupChangeToDifferentCluster")
.detail("Tenant", self->tenantName)
.detail("OriginalGroup", tenantEntry.tenantGroup)
.detail("DesiredGroup", desiredGroup)
.detail("TenantAssignedCluster", tenantEntry.assignedCluster)
.detail("DesiredGroupAssignedCluster", tenantGroupEntry.get().assignedCluster);

throw invalid_tenant_configuration();
}
}

Expand Down
Loading

0 comments on commit 1b8512e

Please sign in to comment.