mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-02 19:25:52 +08:00
Compute known committed version correctly when version vector unicast is enabled (#11511)
* - Compute known committed version correctly when version vector unicast is enabled. * - Set ProxyCommitData::minKnownCommittedVersion only if the commit version is above ProxyCommitData::committedVersion.
This commit is contained in:
parent
c630fa2296
commit
aacf2e29db
@ -2503,7 +2503,10 @@ ACTOR Future<Void> transactionLogging(CommitBatchContext* self) {
|
||||
try {
|
||||
choose {
|
||||
when(Version ver = wait(self->loggingComplete)) {
|
||||
pProxyCommitData->minKnownCommittedVersion = std::max(pProxyCommitData->minKnownCommittedVersion, ver);
|
||||
if (!SERVER_KNOBS->ENABLE_VERSION_VECTOR_TLOG_UNICAST) {
|
||||
pProxyCommitData->minKnownCommittedVersion =
|
||||
std::max(pProxyCommitData->minKnownCommittedVersion, ver);
|
||||
}
|
||||
}
|
||||
when(wait(pProxyCommitData->committedVersion.whenAtLeast(self->commitVersion + 1))) {}
|
||||
}
|
||||
@ -2591,6 +2594,11 @@ ACTOR Future<Void> reply(CommitBatchContext* self) {
|
||||
pProxyCommitData->locked = self->lockedAfter;
|
||||
pProxyCommitData->metadataVersion = self->metadataVersionAfter;
|
||||
pProxyCommitData->committedVersion.set(self->commitVersion);
|
||||
if (SERVER_KNOBS->ENABLE_VERSION_VECTOR_TLOG_UNICAST) {
|
||||
ASSERT(self->loggingComplete.isReady());
|
||||
pProxyCommitData->minKnownCommittedVersion =
|
||||
std::max(pProxyCommitData->minKnownCommittedVersion, self->loggingComplete.get());
|
||||
}
|
||||
}
|
||||
|
||||
if (self->forceRecovery) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user