Moved debug_advanceMaxCommittedVersion to right before the commit future is waited. Throw the SE commit failure that was previously siliently swallowed.

This commit is contained in:
Xin Dong 2020-10-09 19:21:22 -07:00
parent 7506caaac4
commit 28707de343
1 changed files with 5 additions and 1 deletions

View File

@ -3099,6 +3099,7 @@ ACTOR Future<Void> updateStorage(StorageServer* data) {
data->durableInProgress = durableInProgress.getFuture();
durable = data->storage.commit(); // Commit data up to(inclusive) version pendingCommitVersion
durableMinDelay = delay(SERVER_KNOBS->STORAGE_COMMIT_INTERVAL, TaskPriority::UpdateStorage);
debug_advanceMaxCommittedVersion(data->thisServerID, pendingCommitVersion);
if (finalCommit) {
wait(durable && durableMinDelay);
done = true;
@ -3273,6 +3274,9 @@ ACTOR Future<bool> asyncPrepareVersionsForCommit_impl(StorageServerDisk* self, S
}
if (stopEarly.isReady()) {
// Previous commit is done.
if (durable.isError()) {
throw durable.getError();
}
break;
}
} else {
@ -3297,7 +3301,7 @@ ACTOR Future<bool> asyncPrepareVersionsForCommit_impl(StorageServerDisk* self, S
// Set the new durable version as part of the outstanding change set, before commit
data->storage.makeVersionDurable( newOldestVersion );
}
debug_advanceMaxCommittedVersion( data->thisServerID, newOldestVersion );
wait(forgetter.signal());
return finalCommit;
}