Skip to content

Commit 4b0fba6

Browse files
committed
Explain waitForVersion why wait for version minus MAX_READ_TRANSACTION_LIFE_VERSIONS
1 parent 222da17 commit 4b0fba6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fdbserver/LogRouter.actor.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ ACTOR Future<Void> waitForVersion( LogRouterData *self, Version ver ) {
245245
return Void();
246246
}
247247
if(!self->foundEpochEnd) {
248-
// Why it only needs to wait for (ver - SERVER_KNOBS->MAX_READ_TRANSACTION_LIFE_VERSIONS), instead of ver?
248+
// Similar to proxy that does not keep more than MAX_READ_TRANSACTION_LIFE_VERSIONS transactions oustanding;
249+
// Log router does not keep more than MAX_READ_TRANSACTION_LIFE_VERSIONS transactions outstanding because
250+
// remote SS cannot roll back to more than MAX_READ_TRANSACTION_LIFE_VERSIONS ago.
249251
wait(self->minPopped.whenAtLeast(std::min(self->version.get(), ver - SERVER_KNOBS->MAX_READ_TRANSACTION_LIFE_VERSIONS)));
250252
} else {
251253
while(self->minPopped.get() + SERVER_KNOBS->MAX_READ_TRANSACTION_LIFE_VERSIONS < ver) {

0 commit comments

Comments
 (0)