Merge pull request #10518 from oleg68/bugfix/clang-17
Fixed compiling foundationdb with the clang 17 compiler
This commit is contained in:
commit
908d84c893
|
@ -913,7 +913,7 @@ ACTOR Future<Void> clearData(Database cx, Optional<TenantName> defaultTenant) {
|
||||||
|
|
||||||
std::vector<Future<Void>> deleteFutures;
|
std::vector<Future<Void>> deleteFutures;
|
||||||
for (auto const& [id, entry] : tenants.results) {
|
for (auto const& [id, entry] : tenants.results) {
|
||||||
if (entry.tenantName != defaultTenant) {
|
if (!defaultTenant.present() || entry.tenantName != defaultTenant.get()) {
|
||||||
deleteFutures.push_back(TenantAPI::deleteTenantTransaction(&tr, id));
|
deleteFutures.push_back(TenantAPI::deleteTenantTransaction(&tr, id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ struct DcLagWorkload : TestWorkload {
|
||||||
std::vector<IPAddress> ips; // all remote process IPs
|
std::vector<IPAddress> ips; // all remote process IPs
|
||||||
for (const auto& process : g_simulator->getAllProcesses()) {
|
for (const auto& process : g_simulator->getAllProcesses()) {
|
||||||
const auto& ip = process->address.ip;
|
const auto& ip = process->address.ip;
|
||||||
if (process->locality.dcId().present() && process->locality.dcId().get() == g_simulator->remoteDcId) {
|
if (process->locality.dcId().present() && process->locality.dcId() == g_simulator->remoteDcId) {
|
||||||
ips.push_back(ip);
|
ips.push_back(ip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ struct GcGenerationsWorkload : TestWorkload {
|
||||||
std::vector<IPAddress> remoteIps; // all remote process IPs
|
std::vector<IPAddress> remoteIps; // all remote process IPs
|
||||||
for (const auto& process : g_simulator->getAllProcesses()) {
|
for (const auto& process : g_simulator->getAllProcesses()) {
|
||||||
const auto& ip = process->address.ip;
|
const auto& ip = process->address.ip;
|
||||||
if (process->locality.dcId().present() && process->locality.dcId().get() == g_simulator->remoteDcId &&
|
if (process->locality.dcId().present() && process->locality.dcId() == g_simulator->remoteDcId &&
|
||||||
!isCoordinator(coordinators, ip)) {
|
!isCoordinator(coordinators, ip)) {
|
||||||
remoteIps.push_back(ip);
|
remoteIps.push_back(ip);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -233,7 +233,7 @@ struct ConfigureTenantImpl {
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->updatedEntry.toTenantMapEntry() == tenantEntry) {
|
if (self->updatedEntry.toTenantMapEntry() == tenantEntry.get()) {
|
||||||
// No update to write to data cluster, just return.
|
// No update to write to data cluster, just return.
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,12 +214,13 @@ private:
|
||||||
ASSERT_EQ(data.metaclusterRegistration.get().version, managementData.metaclusterRegistration.get().version);
|
ASSERT_EQ(data.metaclusterRegistration.get().version, managementData.metaclusterRegistration.get().version);
|
||||||
|
|
||||||
if (data.tenantData.lastTenantId >= 0) {
|
if (data.tenantData.lastTenantId >= 0) {
|
||||||
ASSERT_EQ(TenantAPI::getTenantIdPrefix(data.tenantData.lastTenantId), managementData.tenantIdPrefix);
|
ASSERT_EQ(TenantAPI::getTenantIdPrefix(data.tenantData.lastTenantId),
|
||||||
|
managementData.tenantIdPrefix.get());
|
||||||
ASSERT_LE(data.tenantData.lastTenantId, managementData.tenantData.lastTenantId);
|
ASSERT_LE(data.tenantData.lastTenantId, managementData.tenantData.lastTenantId);
|
||||||
} else {
|
} else {
|
||||||
CODE_PROBE(true, "Data cluster has no tenants with current tenant ID prefix");
|
CODE_PROBE(true, "Data cluster has no tenants with current tenant ID prefix");
|
||||||
for (auto const& [id, tenant] : data.tenantData.tenantMap) {
|
for (auto const& [id, tenant] : data.tenantData.tenantMap) {
|
||||||
ASSERT_NE(TenantAPI::getTenantIdPrefix(id), managementData.tenantIdPrefix);
|
ASSERT_NE(TenantAPI::getTenantIdPrefix(id), managementData.tenantIdPrefix.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,7 +260,8 @@ private:
|
||||||
ASSERT_EQ(metaclusterEntry.tenantState, TenantState::READY);
|
ASSERT_EQ(metaclusterEntry.tenantState, TenantState::READY);
|
||||||
ASSERT(entry.tenantName == metaclusterEntry.tenantName);
|
ASSERT(entry.tenantName == metaclusterEntry.tenantName);
|
||||||
} else if (entry.tenantName != metaclusterEntry.tenantName) {
|
} else if (entry.tenantName != metaclusterEntry.tenantName) {
|
||||||
ASSERT(entry.tenantName == metaclusterEntry.renameDestination);
|
ASSERT(metaclusterEntry.renameDestination.present() &&
|
||||||
|
entry.tenantName == metaclusterEntry.renameDestination.get());
|
||||||
}
|
}
|
||||||
if (metaclusterEntry.tenantState != TenantState::UPDATING_CONFIGURATION &&
|
if (metaclusterEntry.tenantState != TenantState::UPDATING_CONFIGURATION &&
|
||||||
metaclusterEntry.tenantState != TenantState::REMOVING) {
|
metaclusterEntry.tenantState != TenantState::REMOVING) {
|
||||||
|
|
Loading…
Reference in New Issue