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

storage: should reads enforce seq nums? #28289

Closed
andreimatei opened this issue Aug 6, 2018 · 3 comments
Closed

storage: should reads enforce seq nums? #28289

andreimatei opened this issue Aug 6, 2018 · 3 comments
Labels
A-kv-transactions Relating to MVCC and the transactional model. C-question A question rather than an issue. No code/spec/doc change needed.
Milestone

Comments

@andreimatei
Copy link
Contributor

I believe seq nums are currently ignored for reads, but should they be? If a replayed read encounters an intent from the same txn with a higher seq num, shouldn't that write be invisible to it?

cc @tschottdorf

@andreimatei andreimatei added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-kv-transactions Relating to MVCC and the transactional model. labels Aug 6, 2018
@tbg
Copy link
Member

tbg commented Aug 7, 2018

Technically yes, but we just haven't needed that behavior so far. It would become important if we needed to replay a pipeline, but then we'd be screwed anyway because we don't keep historic versions of intents of the same txn around, and that would be needed to satisfy these reads.

@tbg tbg added C-question A question rather than an issue. No code/spec/doc change needed. and removed C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. labels Aug 7, 2018
@tbg tbg added this to the Later milestone Aug 7, 2018
@nvanbenschoten nvanbenschoten removed their assignment Aug 7, 2018
@nvanbenschoten
Copy link
Member

Right, we don't currently rely on sequence numbers to provide idempotency from a clients perspective, just to prevent repeated side effects if a request is replayed. Since a read doesn't have any side effects (other than the tscache, but we can ignore that here), whether we enforce seq nums or not during reads shouldn't make a difference.

@andreimatei
Copy link
Contributor Author

Yeah, I had a bit of a brain fart when writing this, not realizing that the client must not be waiting for the read any more if the read got reordered with an overlapping write.
Linking to a broader replay discussion in #26915

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-kv-transactions Relating to MVCC and the transactional model. C-question A question rather than an issue. No code/spec/doc change needed.
Projects
None yet
Development

No branches or pull requests

3 participants