Rename backupLoggingEnabled as backupWorkerEnabled

To highlight the changes for 7.0 backup changes. By default,
backup_worker_enabled flag is set for 7.0 version.
This commit is contained in:
Jingyu Zhou 2020-02-04 10:09:16 -08:00
parent 28349e2b03
commit 52c6737411
9 changed files with 13 additions and 13 deletions

View File

@ -557,7 +557,7 @@
"auto_proxies":3,
"auto_resolvers":1,
"auto_logs":3,
"backup_logging_enabled":1,
"backup_worker_enabled":1,
"proxies":5 // this field will be absent if a value has not been explicitly set
},
"data":{

View File

@ -41,7 +41,7 @@ void DatabaseConfiguration::resetInternal() {
tLogPolicy = storagePolicy = remoteTLogPolicy = Reference<IReplicationPolicy>();
remoteDesiredTLogCount = -1;
remoteTLogReplicationFactor = repopulateRegionAntiQuorum = 0;
backupLoggingEnabled = true;
backupWorkerEnabled = true;
}
void parse( int* i, ValueRef const& v ) {
@ -324,7 +324,7 @@ StatusObject DatabaseConfiguration::toJSON(bool noPolicies) const {
result["auto_logs"] = autoDesiredTLogCount;
}
result["backup_logging_enabled"] = (int32_t)backupLoggingEnabled;
result["backup_worker_enabled"] = (int32_t)backupWorkerEnabled;
}
return result;
@ -437,7 +437,7 @@ bool DatabaseConfiguration::setInternal(KeyRef key, ValueRef value) {
else if (ck == LiteralStringRef("remote_logs")) parse(&remoteDesiredTLogCount, value);
else if (ck == LiteralStringRef("remote_log_replicas")) parse(&remoteTLogReplicationFactor, value);
else if (ck == LiteralStringRef("remote_log_policy")) parseReplicationPolicy(&remoteTLogPolicy, value);
else if (ck == LiteralStringRef("backup_logging_enabled")) { parse((&type), value); backupLoggingEnabled = (type != 0); }
else if (ck == LiteralStringRef("backup_worker_enabled")) { parse((&type), value); backupWorkerEnabled = (type != 0); }
else if (ck == LiteralStringRef("usable_regions")) parse(&usableRegions, value);
else if (ck == LiteralStringRef("repopulate_anti_quorum")) parse(&repopulateRegionAntiQuorum, value);
else if (ck == LiteralStringRef("regions")) parse(&regions, value);

View File

@ -179,7 +179,7 @@ struct DatabaseConfiguration {
Reference<IReplicationPolicy> remoteTLogPolicy;
// Backup Workers
bool backupLoggingEnabled;
bool backupWorkerEnabled;
//Data centers
int32_t usableRegions;

View File

@ -2387,7 +2387,7 @@ namespace fileBackup {
// Check if backup worker is enabled
DatabaseConfiguration dbConfig = wait(getDatabaseConfiguration(cx));
if (!dbConfig.backupLoggingEnabled) {
if (!dbConfig.backupWorkerEnabled) {
return Void();
}

View File

@ -591,7 +591,7 @@ const KeyRef JSONSchemas::statusSchema = LiteralStringRef(R"statusSchema(
"auto_resolvers":1,
"auto_logs":3,
"proxies":5,
"backup_logging_enabled":1
"backup_worker_enabled":1
},
"data":{
"least_operating_space_bytes_log_server":0,

View File

@ -780,7 +780,7 @@ public:
}
}
if (req.configuration.backupLoggingEnabled) {
if (req.configuration.backupWorkerEnabled) {
const int nBackup = std::max<int>(
(req.configuration.desiredLogRouterCount > 0 ? req.configuration.desiredLogRouterCount : tlogs.size()),
req.maxOldLogRouters);
@ -916,7 +916,7 @@ public:
for(int i = 0; i < proxies.size(); i++)
result.proxies.push_back(proxies[i].interf);
if (req.configuration.backupLoggingEnabled) {
if (req.configuration.backupWorkerEnabled) {
const int nBackup = std::max<int>(tlogs.size(), req.maxOldLogRouters);
auto backupWorkers = getWorkersForRoleInDatacenter(dcId, ProcessClass::Backup, nBackup,
req.configuration, id_used);

View File

@ -878,7 +878,7 @@ void SimulationConfig::generateNormalConfig(int minimumReplication, int minimumR
ASSERT(false); // Programmer forgot to adjust cases.
}
set_config("backup_logging_enabled:=1");
set_config("backup_worker_enabled:=1");
if (deterministicRandom()->random01() < 0.5) {
int logSpill = deterministicRandom()->randomInt( TLogSpillType::VALUE, TLogSpillType::END );
set_config(format("log_spill:=%d", logSpill));

View File

@ -2144,11 +2144,11 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCounted<TagPartitionedLogS
logSystem->addPseudoLocality(tagLocalityLogRouterMapped);
TraceEvent e("AddPseudoLocality", logSystem->getDebugID());
e.detail("Locality1", "LogRouterMapped");
if (configuration.backupLoggingEnabled) {
if (configuration.backupWorkerEnabled) {
logSystem->addPseudoLocality(tagLocalityBackup);
e.detail("Locality2", "Backup");
}
} else if (configuration.backupLoggingEnabled) {
} else if (configuration.backupWorkerEnabled) {
// Single region uses log router tag for backup workers.
logSystem->logRouterTags = recr.tLogs.size() * std::max<int>(1, configuration.desiredLogRouterCount / std::max<int>(1, recr.tLogs.size()));
logSystem->addPseudoLocality(tagLocalityBackup);

View File

@ -1525,7 +1525,7 @@ ACTOR Future<Void> masterCore( Reference<MasterData> self ) {
self->addActor.send( changeCoordinators(self) );
Database cx = openDBOnServer(self->dbInfo, TaskPriority::DefaultEndpoint, true, true);
self->addActor.send(configurationMonitor(self, cx));
if (self->configuration.backupLoggingEnabled) {
if (self->configuration.backupWorkerEnabled) {
self->addActor.send(recruitBackupWorkers(self, cx));
}