-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix transaction_too_old error when version vector is enabled #8710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When VV is enabled, the comparison of storage server version and read version should use the original read version, otherwise, the client may get the wrong transaction_too_old error.
Doxense CI Report for Windows 10
|
Result of foundationdb-pr-macos-m1 on macOS BigSur 11.5.2
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Monterey 12.x
|
Doxense CI Report for Windows 10
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
|
Changed the return value of 500k 20221107-224558-jzhou-0ff337f1652a9d5e. 3 failures are not using version vector, so should be unrelated. |
Result of foundationdb-pr-macos on macOS Monterey 12.x
|
Doxense CI Report for Windows 10
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
|
What test surfaced this problem? |
fdbserver/storageserver.actor.cpp
Outdated
| if (data->version.get() < readVersion) { | ||
| // Majority of the case, try using higher version to avoid | ||
| // transaction_too_old error when oldestVersion advances. | ||
| return data->version.get(); // majority of cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this solution. This is correct because this storage server doesn't have any newer commits in the range (commitVersion, readVersion] and so can read at any version in this range.
A simulation test found this: commit: 333a8bf |
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Doxense CI Report for Windows 10
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Cherrypick #8745
When VV is enabled,
the comparison of storage server version and read version should use the original read version, otherwise, the client may get the wrong transaction_too_old error. In the failed seed, this prevents the consistency check from finishing.thewaitForVersion()may use the oldest version in the MVCC window as the actual read version, which may often result in thetransaction_too_oldif the MVCC moved, especially during areadRange(). The change here is to try using a higher read version that is still valid, but not likely to causetransaction_too_olderror.commit: 333a8bf
seed: -f ./foundationdb/tests/fast/MutationLogReaderCorrectness.toml -s 728034139 -b on
clang
500k 20221105-190436-jzhou-52ae8ebf0861e8bd passed.
Code-Reviewer Section
The general pull request guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
release-branchormainif this is the youngest branch)