Merge pull request #10518 from oleg68/bugfix/clang-17

Fixed compiling foundationdb with the clang 17 compiler
This commit is contained in:
A.J. Beamon 2023-09-13 09:59:52 -07:00 committed by GitHub
commit 908d84c893
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 7 deletions

View File

@ -913,7 +913,7 @@ ACTOR Future<Void> clearData(Database cx, Optional<TenantName> defaultTenant) {
std::vector<Future<Void>> deleteFutures;
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));
}
}

View File

@ -75,7 +75,7 @@ struct DcLagWorkload : TestWorkload {
std::vector<IPAddress> ips; // all remote process IPs
for (const auto& process : g_simulator->getAllProcesses()) {
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);
}
}

View File

@ -97,7 +97,7 @@ struct GcGenerationsWorkload : TestWorkload {
std::vector<IPAddress> remoteIps; // all remote process IPs
for (const auto& process : g_simulator->getAllProcesses()) {
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)) {
remoteIps.push_back(ip);
} else {

View File

@ -233,7 +233,7 @@ struct ConfigureTenantImpl {
return Void();
}
if (self->updatedEntry.toTenantMapEntry() == tenantEntry) {
if (self->updatedEntry.toTenantMapEntry() == tenantEntry.get()) {
// No update to write to data cluster, just return.
return Void();
}

View File

@ -214,12 +214,13 @@ private:
ASSERT_EQ(data.metaclusterRegistration.get().version, managementData.metaclusterRegistration.get().version);
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);
} else {
CODE_PROBE(true, "Data cluster has no tenants with current tenant ID prefix");
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(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 &&
metaclusterEntry.tenantState != TenantState::REMOVING) {