Merge pull request #9753 from sfc-gh-ajbeamon/fix-tenant-list-infinite-loop
Do not list renaming tenants twice when listing tenant metadata
This commit is contained in:
commit
d324afe1bd
|
@ -2936,7 +2936,12 @@ Future<std::vector<std::pair<TenantName, MetaclusterTenantMapEntry>>> listTenant
|
|||
results.reserve(futures.size());
|
||||
for (int i = 0; i < futures.size(); ++i) {
|
||||
const MetaclusterTenantMapEntry& entry = futures[i].get().get();
|
||||
results.emplace_back(entry.tenantName, entry);
|
||||
|
||||
// Tenants being renamed show up in tenantIds twice, once under each name. The destination name will be
|
||||
// different from the tenant entry and is filtered from the list
|
||||
if (entry.tenantName == tenantIds[i].first) {
|
||||
results.emplace_back(entry.tenantName, entry);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
|
|
Loading…
Reference in New Issue