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

Wrong documentation of testcase singledc/clocksi_SUITE:clocksi_test_read_wait #403

Open
peterzeller opened this issue Nov 13, 2019 · 1 comment

Comments

@peterzeller
Copy link
Member

The documentation of the test states

The following function tests that ClockSI does not read values
inserted by a tx with higher commit timestamp than the snapshot time
of the reading tx.

However, the testcase actually checks that the updated value is read.

This was different in the original version of the test: 0ad34d5

So maybe we introduced a bug and just changed the test case to fit it? The value was changed in 808170e#diff-af4a574965e2bea36840415849262ec4R179

Maybe someone with knowledge of the protocol (@bieniusa ?) can clarify this.

@bieniusa
Copy link
Contributor

I think the documentation is wrong here.
If commitTime of T_1 < snapshotTime of T_2, the read in T_2 should return the value written in T_1, i.e. the incremented one.
This means that T_2 might need to wait till T_1 committed as indicated by the name of the test case.

We should add the comparison of times as an assert. Also, if possible, let's try to get rid of these sleeps, it seems to indicate that the tests are nondeterministic.
The original test is.... buggy.

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

No branches or pull requests

2 participants