- Make sequencer accept the recovery transaction version unconditionally.

Cluster controller could send multiple recovery transaction versions
and not accpeting them unconditionally could cause a discrepancy between
the recovery transaction versions on the sequencer and the resolvers,
resulting in a hung recovery (because the cluster controller won't be able
to commit the recovery transaction version).
This commit is contained in:
Sreenath Bodagala 2022-05-26 13:37:12 +00:00
parent 18bd518f6e
commit 0402de9085
1 changed files with 7 additions and 9 deletions

View File

@ -312,18 +312,16 @@ ACTOR Future<Void> updateRecoveryData(Reference<MasterData> self) {
loop {
UpdateRecoveryDataRequest req = waitNext(self->myInterface.updateRecoveryData.getFuture());
TraceEvent("UpdateRecoveryData", self->dbgid)
.detail("RecoveryTxnVersion", req.recoveryTransactionVersion)
.detail("LastEpochEnd", req.lastEpochEnd)
.detail("ReceivedRecoveryTxnVersion", req.recoveryTransactionVersion)
.detail("ReceivedLastEpochEnd", req.lastEpochEnd)
.detail("CurrentRecoveryTxnVersion", self->recoveryTransactionVersion)
.detail("CurrentLastEpochEnd", self->lastEpochEnd)
.detail("NumCommitProxies", req.commitProxies.size())
.detail("VersionEpoch", req.versionEpoch);
if (self->recoveryTransactionVersion == invalidVersion ||
req.recoveryTransactionVersion > self->recoveryTransactionVersion) {
self->recoveryTransactionVersion = req.recoveryTransactionVersion;
}
if (self->lastEpochEnd == invalidVersion || req.lastEpochEnd > self->lastEpochEnd) {
self->lastEpochEnd = req.lastEpochEnd;
}
self->recoveryTransactionVersion = req.recoveryTransactionVersion;
self->lastEpochEnd = req.lastEpochEnd;
if (req.commitProxies.size() > 0) {
self->lastCommitProxyVersionReplies.clear();