From 35e816e9ad6a88c03e5aa3cee20e4323bd903e33 Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Mon, 14 Oct 2019 18:30:15 -0700 Subject: [PATCH 1/6] added the ability to configure satellite_logs by satellite location, this will overwrite the region configure if both are present --- documentation/sphinx/source/configuration.rst | 6 ++- .../source/mr-status-json-schemas.rst.inc | 38 ++++++++++++++++++- fdbclient/DatabaseConfiguration.cpp | 4 ++ fdbclient/DatabaseConfiguration.h | 5 ++- fdbclient/ManagementAPI.actor.cpp | 2 +- fdbclient/Schemas.cpp | 6 ++- fdbserver/ClusterController.actor.cpp | 10 ++++- fdbserver/SimulatedCluster.actor.cpp | 11 +++--- .../workloads/ConfigureDatabase.actor.cpp | 11 +++--- 9 files changed, 73 insertions(+), 20 deletions(-) diff --git a/documentation/sphinx/source/configuration.rst b/documentation/sphinx/source/configuration.rst index e14be04590..270b9201dd 100644 --- a/documentation/sphinx/source/configuration.rst +++ b/documentation/sphinx/source/configuration.rst @@ -599,7 +599,8 @@ Regions are configured in FoundationDB as a json document. For example:: "datacenters":[{ "id":"WC1", "priority":1, - "satellite":1 + "satellite":1, + "satellite_logs":2 }], "satellite_redundancy_mode":"one_satellite_double", "satellite_logs":2 @@ -659,7 +660,8 @@ This is the region configuration that implements the example:: },{ "id":"WC2", "priority":0, - "satellite":1 + "satellite":1, + "satellite_logs":2 }], "satellite_redundancy_mode":"one_satellite_double" },{ diff --git a/documentation/sphinx/source/mr-status-json-schemas.rst.inc b/documentation/sphinx/source/mr-status-json-schemas.rst.inc index e337fdb333..9b0d1dbc8b 100644 --- a/documentation/sphinx/source/mr-status-json-schemas.rst.inc +++ b/documentation/sphinx/source/mr-status-json-schemas.rst.inc @@ -494,11 +494,47 @@ "three_data_hall", "three_data_hall_fallback" ]}, + + +{ "regions":[{ + "datacenters":[{ + "id":"DC1", + "priority":1 + }, + { + "id":"DC3", + "priority":0, + "satellite":1, + "satellite_logs":1 + }, + { + "id":"DC4", + "priority":1, + "satellite":1, + "satellite_logs":2 + }], + "satellite_redundancy_mode":"one_satellite_single", + "satellite_logs":1 + },{ + "datacenters":[{ + "id":"DC2", + "priority":0 + }], + }] +} + + + + + + + "regions":[{ "datacenters":[{ "id":"mr", "priority":1, - "satellite":1 + "satellite":1, + "satellite_logs":2 }], "satellite_redundancy_mode":{ "$enum":[ diff --git a/fdbclient/DatabaseConfiguration.cpp b/fdbclient/DatabaseConfiguration.cpp index cc51d84d25..fe71530b38 100644 --- a/fdbclient/DatabaseConfiguration.cpp +++ b/fdbclient/DatabaseConfiguration.cpp @@ -73,6 +73,7 @@ void parse( std::vector* regions, ValueRef const& v ) { s.get("id", idStr); satInfo.dcId = idStr; s.get("priority", satInfo.priority); + s.tryGet("satellite_logs", satInfo.satelliteDesiredTLogCount); info.satellites.push_back(satInfo); } else { if (foundNonSatelliteDatacenter) throw invalid_option(); @@ -365,6 +366,9 @@ StatusArray DatabaseConfiguration::getRegionJSON() const { satObj["id"] = s.dcId.toString(); satObj["priority"] = s.priority; satObj["satellite"] = 1; + if(s.satelliteDesiredTLogCount != -1) { + satObj["satellite_logs"] = s.satelliteDesiredTLogCount; + } dcArr.push_back(satObj); } diff --git a/fdbclient/DatabaseConfiguration.h b/fdbclient/DatabaseConfiguration.h index 7a894bbf8a..5067db321a 100644 --- a/fdbclient/DatabaseConfiguration.h +++ b/fdbclient/DatabaseConfiguration.h @@ -32,8 +32,9 @@ struct SatelliteInfo { Key dcId; int32_t priority; + int32_t satelliteDesiredTLogCount; - SatelliteInfo() : priority(0) {} + SatelliteInfo() : priority(0), satelliteDesiredTLogCount(-1) {} struct sort_by_priority { bool operator ()(SatelliteInfo const&a, SatelliteInfo const& b) const { return a.priority > b.priority; } @@ -41,7 +42,7 @@ struct SatelliteInfo { template void serialize(Ar& ar) { - serializer(ar, dcId, priority); + serializer(ar, dcId, priority, satelliteDesiredTLogCount); } }; diff --git a/fdbclient/ManagementAPI.actor.cpp b/fdbclient/ManagementAPI.actor.cpp index 16daaae045..14cd25abe5 100644 --- a/fdbclient/ManagementAPI.actor.cpp +++ b/fdbclient/ManagementAPI.actor.cpp @@ -67,7 +67,7 @@ std::map configForToken( std::string const& mode ) { std::string key = mode.substr(0, pos); std::string value = mode.substr(pos+1); - if( (key == "logs" || key == "proxies" || key == "resolvers" || key == "remote_logs" || key == "log_routers" || key == "satellite_logs" || key == "usable_regions" || key == "repopulate_anti_quorum") && isInteger(value) ) { + if( (key == "logs" || key == "proxies" || key == "resolvers" || key == "remote_logs" || key == "log_routers" || key == "usable_regions" || key == "repopulate_anti_quorum") && isInteger(value) ) { out[p+key] = value; } diff --git a/fdbclient/Schemas.cpp b/fdbclient/Schemas.cpp index 436c3e2d50..b02daeee80 100644 --- a/fdbclient/Schemas.cpp +++ b/fdbclient/Schemas.cpp @@ -522,7 +522,8 @@ const KeyRef JSONSchemas::statusSchema = LiteralStringRef(R"statusSchema( "datacenters":[{ "id":"mr", "priority":1, - "satellite":1 + "satellite":1, + "satellite_logs":2 }], "satellite_redundancy_mode":{ "$enum":[ @@ -732,7 +733,8 @@ const KeyRef JSONSchemas::clusterConfigurationSchema = LiteralStringRef(R"config "datacenters":[{ "id":"mr", "priority":1, - "satellite":1 + "satellite":1, + "satellite_logs":2 }], "satellite_redundancy_mode":{ "$enum":[ diff --git a/fdbserver/ClusterController.actor.cpp b/fdbserver/ClusterController.actor.cpp index 79c122f1d6..959e7b9f10 100644 --- a/fdbserver/ClusterController.actor.cpp +++ b/fdbserver/ClusterController.actor.cpp @@ -398,8 +398,14 @@ public: try { bool remoteDCUsedAsSatellite = false; std::set> satelliteDCs; + int32_t desiredSatelliteTLogs = 0; for(int s = startDC; s < std::min(startDC + (satelliteFallback ? region.satelliteTLogUsableDcsFallback : region.satelliteTLogUsableDcs), region.satellites.size()); s++) { satelliteDCs.insert(region.satellites[s].dcId); + if(region.satellites[s].satelliteDesiredTLogCount == -1 || desiredSatelliteTLogs == -1) { + desiredSatelliteTLogs = -1; + } else { + desiredSatelliteTLogs += region.satellites[s].satelliteDesiredTLogCount; + } if (region.satellites[s].dcId == remoteRegion.dcId) { remoteDCUsedAsSatellite = true; } @@ -413,9 +419,9 @@ public: std::transform(remoteLogs.begin(), remoteLogs.end(), std::back_inserter(exclusionWorkerIds), [](const WorkerDetails &in) { return in.interf.id(); }); } if(satelliteFallback) { - return getWorkersForTlogs( conf, region.satelliteTLogReplicationFactorFallback, conf.getDesiredSatelliteLogs(region.dcId)*region.satelliteTLogUsableDcsFallback/region.satelliteTLogUsableDcs, region.satelliteTLogPolicyFallback, id_used, checkStable, satelliteDCs, exclusionWorkerIds); + return getWorkersForTlogs( conf, region.satelliteTLogReplicationFactorFallback, desiredSatelliteTLogs>0 ? desiredSatelliteTLogs : conf.getDesiredSatelliteLogs(region.dcId)*region.satelliteTLogUsableDcsFallback/region.satelliteTLogUsableDcs, region.satelliteTLogPolicyFallback, id_used, checkStable, satelliteDCs, exclusionWorkerIds); } else { - return getWorkersForTlogs( conf, region.satelliteTLogReplicationFactor, conf.getDesiredSatelliteLogs(region.dcId), region.satelliteTLogPolicy, id_used, checkStable, satelliteDCs, exclusionWorkerIds); + return getWorkersForTlogs( conf, region.satelliteTLogReplicationFactor, desiredSatelliteTLogs>0 ? desiredSatelliteTLogs : conf.getDesiredSatelliteLogs(region.dcId), region.satelliteTLogPolicy, id_used, checkStable, satelliteDCs, exclusionWorkerIds); } } catch (Error &e) { if(e.code() != error_code_no_more_servers) { diff --git a/fdbserver/SimulatedCluster.actor.cpp b/fdbserver/SimulatedCluster.actor.cpp index 1d8e27cf99..4c56421b1f 100644 --- a/fdbserver/SimulatedCluster.actor.cpp +++ b/fdbserver/SimulatedCluster.actor.cpp @@ -945,11 +945,8 @@ void SimulationConfig::generateNormalConfig(int minimumReplication, int minimumR } } - if (deterministicRandom()->random01() < 0.25) { - int logs = deterministicRandom()->randomInt(1,7); - primaryObj["satellite_logs"] = logs; - remoteObj["satellite_logs"] = logs; - } + if (deterministicRandom()->random01() < 0.25) primaryObj["satellite_logs"] = deterministicRandom()->randomInt(1,7); + if (deterministicRandom()->random01() < 0.25) remoteObj["satellite_logs"] = deterministicRandom()->randomInt(1,7); //We cannot run with a remote DC when MAX_READ_TRANSACTION_LIFE_VERSIONS is too small, because the log routers will not be able to keep up. if (minimumRegions <= 1 && (deterministicRandom()->random01() < 0.25 || SERVER_KNOBS->MAX_READ_TRANSACTION_LIFE_VERSIONS < SERVER_KNOBS->VERSIONS_PER_SECOND)) { @@ -998,12 +995,14 @@ void SimulationConfig::generateNormalConfig(int minimumReplication, int minimumR primarySatelliteObj["id"] = useNormalDCsAsSatellites ? "1" : "2"; primarySatelliteObj["priority"] = 1; primarySatelliteObj["satellite"] = 1; + if (deterministicRandom()->random01() < 0.25) primarySatelliteObj["satellite_logs"] = deterministicRandom()->randomInt(1,7); primaryDcArr.push_back(primarySatelliteObj); StatusObject remoteSatelliteObj; remoteSatelliteObj["id"] = useNormalDCsAsSatellites ? "0" : "3"; remoteSatelliteObj["priority"] = 1; remoteSatelliteObj["satellite"] = 1; + if (deterministicRandom()->random01() < 0.25) remoteSatelliteObj["satellite_logs"] = deterministicRandom()->randomInt(1,7); remoteDcArr.push_back(remoteSatelliteObj); if (datacenters > 4) { @@ -1011,12 +1010,14 @@ void SimulationConfig::generateNormalConfig(int minimumReplication, int minimumR primarySatelliteObjB["id"] = useNormalDCsAsSatellites ? "2" : "4"; primarySatelliteObjB["priority"] = 1; primarySatelliteObjB["satellite"] = 1; + if (deterministicRandom()->random01() < 0.25) primarySatelliteObjB["satellite_logs"] = deterministicRandom()->randomInt(1,7); primaryDcArr.push_back(primarySatelliteObjB); StatusObject remoteSatelliteObjB; remoteSatelliteObjB["id"] = useNormalDCsAsSatellites ? "2" : "5"; remoteSatelliteObjB["priority"] = 1; remoteSatelliteObjB["satellite"] = 1; + if (deterministicRandom()->random01() < 0.25) remoteSatelliteObjB["satellite_logs"] = deterministicRandom()->randomInt(1,7); remoteDcArr.push_back(remoteSatelliteObjB); } if (useNormalDCsAsSatellites) { diff --git a/fdbserver/workloads/ConfigureDatabase.actor.cpp b/fdbserver/workloads/ConfigureDatabase.actor.cpp index 0fbfd45884..3b91b348b7 100644 --- a/fdbserver/workloads/ConfigureDatabase.actor.cpp +++ b/fdbserver/workloads/ConfigureDatabase.actor.cpp @@ -75,12 +75,14 @@ std::string generateRegions() { primarySatelliteObj["id"] = "2"; primarySatelliteObj["priority"] = 1; primarySatelliteObj["satellite"] = 1; + if (deterministicRandom()->random01() < 0.25) primarySatelliteObj["satellite_logs"] = deterministicRandom()->randomInt(1,7); primaryDcArr.push_back(primarySatelliteObj); StatusObject remoteSatelliteObj; remoteSatelliteObj["id"] = "3"; remoteSatelliteObj["priority"] = 1; remoteSatelliteObj["satellite"] = 1; + if (deterministicRandom()->random01() < 0.25) remoteSatelliteObj["satellite_logs"] = deterministicRandom()->randomInt(1,7); remoteDcArr.push_back(remoteSatelliteObj); if(g_simulator.physicalDatacenters > 5 && deterministicRandom()->random01() < 0.5) { @@ -88,12 +90,14 @@ std::string generateRegions() { primarySatelliteObjB["id"] = "4"; primarySatelliteObjB["priority"] = 1; primarySatelliteObjB["satellite"] = 1; + if (deterministicRandom()->random01() < 0.25) primarySatelliteObjB["satellite_logs"] = deterministicRandom()->randomInt(1,7); primaryDcArr.push_back(primarySatelliteObjB); StatusObject remoteSatelliteObjB; remoteSatelliteObjB["id"] = "5"; remoteSatelliteObjB["priority"] = 1; remoteSatelliteObjB["satellite"] = 1; + if (deterministicRandom()->random01() < 0.25) remoteSatelliteObjB["satellite_logs"] = deterministicRandom()->randomInt(1,7); remoteDcArr.push_back(remoteSatelliteObjB); int satellite_replication_type = deterministicRandom()->randomInt(0,3); @@ -146,11 +150,8 @@ std::string generateRegions() { } } - if (deterministicRandom()->random01() < 0.25) { - int logs = deterministicRandom()->randomInt(1,7); - primaryObj["satellite_logs"] = logs; - remoteObj["satellite_logs"] = logs; - } + if (deterministicRandom()->random01() < 0.25) primaryObj["satellite_logs"] = deterministicRandom()->randomInt(1,7); + if (deterministicRandom()->random01() < 0.25) remoteObj["satellite_logs"] = deterministicRandom()->randomInt(1,7); int remote_replication_type = deterministicRandom()->randomInt(0, 4); switch (remote_replication_type) { From 5064d91b756a5a59a1ce4d49c3a130b147c156a0 Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Mon, 14 Oct 2019 18:31:23 -0700 Subject: [PATCH 2/6] fix: the cluster controller would not change to a new set of satellite tlogs when they become available in a better satellite location --- fdbserver/ClusterController.actor.cpp | 35 +++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/fdbserver/ClusterController.actor.cpp b/fdbserver/ClusterController.actor.cpp index 959e7b9f10..8b2fdcac30 100644 --- a/fdbserver/ClusterController.actor.cpp +++ b/fdbserver/ClusterController.actor.cpp @@ -1037,11 +1037,42 @@ public: auto newSatelliteTLogs = region.satelliteTLogReplicationFactor > 0 ? getWorkersForSatelliteLogs(db.config, region, remoteRegion, id_used, newSatelliteFallback, true) : satellite_tlogs; RoleFitness newSatelliteTLogFit(newSatelliteTLogs, ProcessClass::TLog); - if(oldSatelliteTLogFit < newSatelliteTLogFit) - return false; + std::map,int32_t> satellite_priority; + for(auto& r : region.satellites) { + satellite_priority[r.dcId] = r.priority; + } + + int32_t oldSatelliteRegionFit = std::numeric_limits::max(); + for(auto& it : satellite_tlogs) { + if(satellite_priority.count(it.interf.locality.dcId())) { + oldSatelliteRegionFit = std::min(oldSatelliteRegionFit, satellite_priority[it.interf.locality.dcId()]); + } else { + oldSatelliteRegionFit = -1; + } + } + + int32_t newSatelliteRegionFit = std::numeric_limits::max(); + for(auto& it : newSatelliteTLogs) { + if(satellite_priority.count(it.interf.locality.dcId())) { + newSatelliteRegionFit = std::min(newSatelliteRegionFit, satellite_priority[it.interf.locality.dcId()]); + } else { + newSatelliteRegionFit = -1; + } + } + + if(oldSatelliteFallback && !newSatelliteFallback) + return true; if(!oldSatelliteFallback && newSatelliteFallback) return false; + if(oldSatelliteRegionFit < newSatelliteRegionFit) + return true; + if(oldSatelliteRegionFit > newSatelliteRegionFit) + return false; + + if(oldSatelliteTLogFit < newSatelliteTLogFit) + return false; + RoleFitness oldRemoteTLogFit(remote_tlogs, ProcessClass::TLog); std::vector exclusionWorkerIds; auto fn = [](const WorkerDetails &in) { return in.interf.id(); }; From 298b815109fcbd3cc3cff7f3797baa397e20e285 Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Mon, 14 Oct 2019 18:32:17 -0700 Subject: [PATCH 3/6] one proxy or resolver with best fitness no longer prevents more proxies or resolvers from being recruited with good fitness --- fdbserver/ClusterController.actor.cpp | 41 +++++++++++++-------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/fdbserver/ClusterController.actor.cpp b/fdbserver/ClusterController.actor.cpp index 8b2fdcac30..97731f6bf1 100644 --- a/fdbserver/ClusterController.actor.cpp +++ b/fdbserver/ClusterController.actor.cpp @@ -468,7 +468,7 @@ public: deterministicRandom()->randomShuffle(w); for( int i=0; i < w.size(); i++ ) { id_used[w[i].interf.locality.processId()]++; - return WorkerFitnessInfo(w[i], it.first.first, it.first.second); + return WorkerFitnessInfo(w[i], std::max(ProcessClass::GoodFit, it.first.first), it.first.second); } } } @@ -524,18 +524,8 @@ public: RoleFitness() : bestFit(ProcessClass::NeverAssign), worstFit(ProcessClass::NeverAssign), role(ProcessClass::NoRole), count(0), worstIsDegraded(false) {} - RoleFitness(RoleFitness first, RoleFitness second, ProcessClass::ClusterRole role) : bestFit(std::min(first.worstFit, second.worstFit)), worstFit(std::max(first.worstFit, second.worstFit)), count(first.count + second.count), role(role) { - if(first.worstFit > second.worstFit) { - worstIsDegraded = first.worstIsDegraded; - } else if(second.worstFit > first.worstFit) { - worstIsDegraded = second.worstIsDegraded; - } else { - worstIsDegraded = first.worstIsDegraded || second.worstIsDegraded; - } - } - RoleFitness( vector workers, ProcessClass::ClusterRole role ) : role(role) { - worstFit = ProcessClass::BestFit; + worstFit = ProcessClass::GoodFit; worstIsDegraded = false; bestFit = ProcessClass::NeverAssign; for(auto& it : workers) { @@ -782,7 +772,7 @@ public: auto datacenters = getDatacenters( req.configuration ); - RoleFitness bestFitness; + std::pair bestFitness; int numEquivalent = 1; Optional bestDC; @@ -799,7 +789,7 @@ public: proxies.push_back(first_proxy.worker); resolvers.push_back(first_resolver.worker); - auto fitness = RoleFitness( RoleFitness(proxies, ProcessClass::Proxy), RoleFitness(resolvers, ProcessClass::Resolver), ProcessClass::NoRole ); + auto fitness = std::make_pair( RoleFitness(proxies, ProcessClass::Proxy), RoleFitness(resolvers, ProcessClass::Resolver) ); if(dcId == clusterControllerDcId) { bestFitness = fitness; @@ -845,7 +835,8 @@ public: if( now() - startTime < SERVER_KNOBS->WAIT_FOR_GOOD_RECRUITMENT_DELAY && ( RoleFitness(SERVER_KNOBS->EXPECTED_TLOG_FITNESS, req.configuration.getDesiredLogs(), ProcessClass::TLog).betterCount(RoleFitness(tlogs, ProcessClass::TLog)) || - RoleFitness(std::min(SERVER_KNOBS->EXPECTED_PROXY_FITNESS, SERVER_KNOBS->EXPECTED_RESOLVER_FITNESS), std::max(SERVER_KNOBS->EXPECTED_PROXY_FITNESS, SERVER_KNOBS->EXPECTED_RESOLVER_FITNESS), req.configuration.getDesiredProxies()+req.configuration.getDesiredResolvers(), ProcessClass::NoRole).betterCount(bestFitness) ) ) { + RoleFitness(SERVER_KNOBS->EXPECTED_PROXY_FITNESS, req.configuration.getDesiredProxies(), ProcessClass::Proxy).betterCount(bestFitness.first) || + RoleFitness(SERVER_KNOBS->EXPECTED_RESOLVER_FITNESS, req.configuration.getDesiredResolvers(), ProcessClass::Resolver).betterCount(bestFitness.second) ) ) { throw operation_failed(); } @@ -991,10 +982,14 @@ public: std::map< Optional>, int> id_used; id_used[clusterControllerProcessId]++; WorkerFitnessInfo mworker = getWorkerForRoleInDatacenter(clusterControllerDcId, ProcessClass::Master, ProcessClass::NeverAssign, db.config, id_used, true); + auto newMasterFit = mworker.worker.processClass.machineClassFitness( ProcessClass::Master ); + if(db.config.isExcludedServer(mworker.worker.interf.address())) { + newMasterFit = std::max(newMasterFit, ProcessClass::ExcludeFit); + } - if ( oldMasterFit < mworker.fitness ) + if ( oldMasterFit < newMasterFit ) return false; - if ( oldMasterFit > mworker.fitness || ( dbi.master.locality.processId() == clusterControllerProcessId && mworker.worker.interf.locality.processId() != clusterControllerProcessId ) ) + if ( oldMasterFit > newMasterFit || ( dbi.master.locality.processId() == clusterControllerProcessId && mworker.worker.interf.locality.processId() != clusterControllerProcessId ) ) return true; std::set> primaryDC; @@ -1024,6 +1019,7 @@ public: if(oldTLogFit < newTLogFit) return false; bool oldSatelliteFallback = false; + for(auto& logSet : dbi.logSystemConfig.tLogs) { if(logSet.isLocal && logSet.locality == tagLocalitySatellite) { oldSatelliteFallback = logSet.tLogPolicy->info() != region.satelliteTLogPolicy->info(); @@ -1096,7 +1092,7 @@ public: } if(oldLogRoutersFit < newLogRoutersFit) return false; // Check proxy/resolver fitness - RoleFitness oldInFit(RoleFitness(proxyClasses, ProcessClass::Proxy), RoleFitness(resolverClasses, ProcessClass::Resolver), ProcessClass::NoRole); + std::pair oldInFit = std::make_pair(RoleFitness(proxyClasses, ProcessClass::Proxy), RoleFitness(resolverClasses, ProcessClass::Resolver)); auto first_resolver = getWorkerForRoleInDatacenter( clusterControllerDcId, ProcessClass::Resolver, ProcessClass::ExcludeFit, db.config, id_used, true ); auto first_proxy = getWorkerForRoleInDatacenter( clusterControllerDcId, ProcessClass::Proxy, ProcessClass::ExcludeFit, db.config, id_used, true ); @@ -1106,12 +1102,13 @@ public: proxies.push_back(first_proxy.worker); resolvers.push_back(first_resolver.worker); - RoleFitness newInFit(RoleFitness(proxies, ProcessClass::Proxy), RoleFitness(resolvers, ProcessClass::Resolver), ProcessClass::NoRole); - if(oldInFit.betterFitness(newInFit)) return false; + std::pair newInFit = std::make_pair(RoleFitness(proxies, ProcessClass::Proxy), RoleFitness(resolvers, ProcessClass::Resolver)); + if(oldInFit.first.betterFitness(newInFit.first) || oldInFit.second.betterFitness(newInFit.second)) return false; if(oldTLogFit > newTLogFit || oldInFit > newInFit || (oldSatelliteFallback && !newSatelliteFallback) || oldSatelliteTLogFit > newSatelliteTLogFit || oldRemoteTLogFit > newRemoteTLogFit || oldLogRoutersFit > newLogRoutersFit) { - TraceEvent("BetterMasterExists", id).detail("OldMasterFit", oldMasterFit).detail("NewMasterFit", mworker.fitness) + TraceEvent("BetterMasterExists", id).detail("OldMasterFit", oldMasterFit).detail("NewMasterFit", newMasterFit) .detail("OldTLogFit", oldTLogFit.toString()).detail("NewTLogFit", newTLogFit.toString()) - .detail("OldInFit", oldInFit.toString()).detail("NewInFit", newInFit.toString()) + .detail("OldProxyFit", oldInFit.first.toString()).detail("NewProxyFit", newInFit.first.toString()) + .detail("OldResolverFit", oldInFit.second.toString()).detail("NewResolverFit", newInFit.second.toString()) .detail("OldSatelliteFit", oldSatelliteTLogFit.toString()).detail("NewSatelliteFit", newSatelliteTLogFit.toString()) .detail("OldRemoteFit", oldRemoteTLogFit.toString()).detail("NewRemoteFit", newRemoteTLogFit.toString()) .detail("OldRouterFit", oldLogRoutersFit.toString()).detail("NewRouterFit", newLogRoutersFit.toString()) From 15a94eea04fd89ee6e743cac67ed010e0106f831 Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Mon, 14 Oct 2019 18:59:10 -0700 Subject: [PATCH 4/6] removed unintended code --- .../source/mr-status-json-schemas.rst.inc | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/documentation/sphinx/source/mr-status-json-schemas.rst.inc b/documentation/sphinx/source/mr-status-json-schemas.rst.inc index 9b0d1dbc8b..c2a73b7d1d 100644 --- a/documentation/sphinx/source/mr-status-json-schemas.rst.inc +++ b/documentation/sphinx/source/mr-status-json-schemas.rst.inc @@ -494,41 +494,6 @@ "three_data_hall", "three_data_hall_fallback" ]}, - - -{ "regions":[{ - "datacenters":[{ - "id":"DC1", - "priority":1 - }, - { - "id":"DC3", - "priority":0, - "satellite":1, - "satellite_logs":1 - }, - { - "id":"DC4", - "priority":1, - "satellite":1, - "satellite_logs":2 - }], - "satellite_redundancy_mode":"one_satellite_single", - "satellite_logs":1 - },{ - "datacenters":[{ - "id":"DC2", - "priority":0 - }], - }] -} - - - - - - - "regions":[{ "datacenters":[{ "id":"mr", From 1af44afad3fa05a344ea80903a7946e3baad5647 Mon Sep 17 00:00:00 2001 From: Evan Tschannen <36455792+etschannen@users.noreply.github.com> Date: Wed, 16 Oct 2019 14:55:02 -0700 Subject: [PATCH 5/6] Update fdbclient/DatabaseConfiguration.h Co-Authored-By: Markus Pilman --- fdbclient/DatabaseConfiguration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdbclient/DatabaseConfiguration.h b/fdbclient/DatabaseConfiguration.h index 5067db321a..a3a56818e7 100644 --- a/fdbclient/DatabaseConfiguration.h +++ b/fdbclient/DatabaseConfiguration.h @@ -32,7 +32,7 @@ struct SatelliteInfo { Key dcId; int32_t priority; - int32_t satelliteDesiredTLogCount; + int32_t satelliteDesiredTLogCount = -1; SatelliteInfo() : priority(0), satelliteDesiredTLogCount(-1) {} From 85bc5f6b8b7313bafef845c09c61d11efe623242 Mon Sep 17 00:00:00 2001 From: Evan Tschannen <36455792+etschannen@users.noreply.github.com> Date: Wed, 16 Oct 2019 15:11:24 -0700 Subject: [PATCH 6/6] Update fdbclient/DatabaseConfiguration.h Co-Authored-By: Markus Pilman --- fdbclient/DatabaseConfiguration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdbclient/DatabaseConfiguration.h b/fdbclient/DatabaseConfiguration.h index a3a56818e7..0fdae09956 100644 --- a/fdbclient/DatabaseConfiguration.h +++ b/fdbclient/DatabaseConfiguration.h @@ -34,7 +34,7 @@ struct SatelliteInfo { int32_t priority; int32_t satelliteDesiredTLogCount = -1; - SatelliteInfo() : priority(0), satelliteDesiredTLogCount(-1) {} + SatelliteInfo() : priority(0) {} struct sort_by_priority { bool operator ()(SatelliteInfo const&a, SatelliteInfo const& b) const { return a.priority > b.priority; }