-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
kvserver: use execution timestamps for verified when available #88550
Conversation
22df830
to
0da53fb
Compare
0da53fb
to
b02b03c
Compare
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.
We could ensure that AmbiguousResultError always contains the one possible commit timestamp. This should work since TxnCoordSender is always local to kvnemesis, and so there's no "fallible" component between the two.
+1. Will we have to extend AmbiguousResultError
with a special case for this, or can we have some test-only side channel in TxnCoordSender
that we can use to obtain this in a clearer way?
Now that "most" operations save their execution timestamps, use them for verification. This has the undesirable side effect of failing the entire test suite, which didn't bother specifying timestamps for most operations. Now they are required, and need to be present, at least for all mutations. I took the opportunity to also clean up the test helpers a bit, so now we don't have to pass an `error` when it's not required. The big remaining caveat is that units that return with an ambiguous result don't necessarily have a commit timestamp. I *think* this is only an implementation detail. We *could* ensure that `AmbiguousResultError` always contains the one possible commit timestamp. This should work since `TxnCoordSender` is always local to `kvnemesis`, and so there's no "fallible" component between the two. This would result in a significant simplification of `kvnemesis`, since as is when there are ambiguous deletions, we have to materialize them but cannot assign them a timestamp. This complicates various code paths and to be honest I'm not even sure what exactly we verify and how it all works when there are such "half-materialized" writes. I would rather do away with the concept altogether. Clearly we also won't be able to simplify the verification to simply use commit order if there are operations that don't have a timestamp, which is another reason to keep pushing on this. Release note: None
bors r=erikgrinaker |
b02b03c
to
09043a3
Compare
Canceled. |
bors r=erikgrinaker |
Build succeeded: |
Now that "most" operations save their execution timestamps, use them
for verification.
This has the undesirable side effect of failing the entire test suite,
which didn't bother specifying timestamps for most operations.
Now they are required, and need to be present, at least for all
mutations.
I took the opportunity to also clean up the test helpers a bit,
so now we don't have to pass an
error
when it's not required.The big remaining caveat is that units that return with an ambiguous
result don't necessarily have a commit timestamp. I think this is only
an implementation detail. We could ensure that
AmbiguousResultError
always contains the one possible commit timestamp. This should work
since
TxnCoordSender
is always local tokvnemesis
, and so there'sno "fallible" component between the two.
This would result in a significant simplification of
kvnemesis
, sinceas is when there are ambiguous deletions, we have to materialize them
but cannot assign them a timestamp. This complicates various code paths
and to be honest I'm not even sure what exactly we verify and how it all
works when there are such "half-materialized" writes. I would rather do
away with the concept altogether. Clearly we also won't be able to
simplify the verification to simply use commit order if there are
operations that don't have a timestamp, which is another reason to keep
pushing on this.
Release note: None