mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-17 03:12:21 +08:00
Explain waitForVersion why wait for version minus MAX_READ_TRANSACTION_LIFE_VERSIONS
This commit is contained in:
parent
222da17558
commit
4b0fba6ea8
@ -245,7 +245,9 @@ ACTOR Future<Void> waitForVersion( LogRouterData *self, Version ver ) {
|
||||
return Void();
|
||||
}
|
||||
if(!self->foundEpochEnd) {
|
||||
// Why it only needs to wait for (ver - SERVER_KNOBS->MAX_READ_TRANSACTION_LIFE_VERSIONS), instead of ver?
|
||||
// Similar to proxy that does not keep more than MAX_READ_TRANSACTION_LIFE_VERSIONS transactions oustanding;
|
||||
// Log router does not keep more than MAX_READ_TRANSACTION_LIFE_VERSIONS transactions outstanding because
|
||||
// remote SS cannot roll back to more than MAX_READ_TRANSACTION_LIFE_VERSIONS ago.
|
||||
wait(self->minPopped.whenAtLeast(std::min(self->version.get(), ver - SERVER_KNOBS->MAX_READ_TRANSACTION_LIFE_VERSIONS)));
|
||||
} else {
|
||||
while(self->minPopped.get() + SERVER_KNOBS->MAX_READ_TRANSACTION_LIFE_VERSIONS < ver) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user