Skip to content
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

Modify get_version_of_previous_write ordering unit test to be less probabilistic #6640

Open
eddyashton opened this issue Nov 13, 2024 · 0 comments

Comments

@eddyashton
Copy link
Member

This unit test currently runs a fixed number of threads for a fixed number of writes, and expects that this produces at least one conflict. Usually it produces several hundred, so the distribution seems safe.

A smarter test would just run until it sees a conflict, and could then end. The suffix of the test that confirms the conflicts are resolved correctly and the resulting tx sequence is sound. Then we have a time-based cap on the test - we expect that we'll produce such a conflict within milliseconds in practice, so giving it several seconds should be a much larger safety margin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant