fix: remoteDcIds will not actually have transaction logs unless usable regions is > 1

This commit is contained in:
Evan Tschannen 2018-11-13 12:36:04 -08:00
parent abb7299e1d
commit 1bd615f954
1 changed files with 4 additions and 2 deletions

View File

@ -1274,9 +1274,11 @@ ACTOR Future<Void> masterCore( Reference<MasterData> self ) {
for(auto& dc : self->primaryDcId) {
tr.set(recoveryCommitRequest.arena, tLogDatacentersKeyFor(dc), StringRef());
}
if(self->configuration.usableRegions > 1) {
for(auto& dc : self->remoteDcIds) {
tr.set(recoveryCommitRequest.arena, tLogDatacentersKeyFor(dc), StringRef());
}
}
applyMetadataMutations(self->dbgid, recoveryCommitRequest.arena, tr.mutations.slice(mmApplied, tr.mutations.size()), self->txnStateStore, NULL, NULL);
mmApplied = tr.mutations.size();