FastRestore:unlockDatabase should always succeed

This commit is contained in:
Meng Xu 2019-10-16 16:59:01 -07:00
parent cc556d77b6
commit 27db9c326b
1 changed files with 6 additions and 9 deletions

View File

@ -202,17 +202,14 @@ ACTOR Future<Void> startProcessRestoreRequests(Reference<RestoreMasterData> self
// Step: Notify all restore requests have been handled by cleaning up the restore keys
wait(notifyRestoreCompleted(self, cx));
numTries = 0;
loop {
try {
wait(unlockDatabase(cx, randomUID));
break;
} catch (Error& e) {
TraceEvent(numTries > 50 ? SevError : SevWarn, "UnlockDBFailed").detail("UID", randomUID.toString());
numTries++;
}
TraceEvent(SevError, "UnlockDBFailed").detail("UID", randomUID.toString());
ASSERT_WE_THINK(false); // This unlockDatabase should always succeed, we think.
}
TraceEvent("FastRestore").detail("RestoreMasterComplete", self->id());
return Void();