kv: use txn deadline as MaxTimestampBound for bound staleness reads#69478
Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom Aug 28, 2021
Merged
Conversation
Member
66f6a03 to
e6b86c6
Compare
ajwerner
approved these changes
Aug 27, 2021
Contributor
ajwerner
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1, 9 of 9 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @otan)
This commit clarifies the boundaries of the dynamic timestamp range represented in BoundedStalenessHeader. It denotes MinTimestampBound as inclusive and switches MaxTimestampBound from inclusive to exclusive. This change allows MaxTimestampBound to more closely parallel EndTxnRequest.Deadline, which is also exclusive. This is important because the next commit will begin setting bounded staleness reads' MaxTimestampBound to the transaction deadline, when set.
Fixes cockroachdb#69343. This commit updates Txn.NegotiateAndSend to respect any prior set transaction deadline. It does so by applying the deadline to the bounded staleness header's `MaxTimestampBound`. This is necessary to prevent the bounded staleness read from choosing a dynamic timestamp that is incoherent with the schema for the table being read. Release justification: fix to new functionality
e6b86c6 to
a4ef9b8
Compare
Contributor
Author
|
bors r+ |
Contributor
Author
|
TFTR! |
Contributor
|
Build failed (retrying...): |
craig bot
pushed a commit
that referenced
this pull request
Aug 28, 2021
69478: kv: use txn deadline as MaxTimestampBound for bound staleness reads r=nvanbenschoten a=nvanbenschoten Fixes #69343. This commit updates Txn.NegotiateAndSend to respect any prior set transaction deadline. It does so by applying the deadline to the bounded staleness header's `MaxTimestampBound`. This is necessary to prevent the bounded staleness read from choosing a dynamic timestamp that is incoherent with the schema for the table being read. Release justification: fix to new functionality 69493: server: make first node and store ID easy to change r=knz a=tbg This is to enable the (sorry, internal) [runbook] to visualize a copy of the internal timeseries data of a cluster. While writing the runbook I found some sharp nails that this PR addresses. Mainly, the running node (n1) on top of which the timeseries data is imported used to clobber some data for n1. The interim solution is to start that server with a very high NodeID/StoreID (via a manual code change & build). This isn't the most user-friendly, but it's enough to unblock us and besides, the code changes here also constitute a desirable cleanup. [runbook]: https://cockroachlabs.atlassian.net/wiki/spaces/TS/pages/2168520776/Exporting+Internal+Timeseries+beta Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com> Co-authored-by: Tobias Grieger <tobias.b.grieger@gmail.com>
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #69343.
This commit updates Txn.NegotiateAndSend to respect any prior set transaction
deadline. It does so by applying the deadline to the bounded staleness header's
MaxTimestampBound. This is necessary to prevent the bounded staleness readfrom choosing a dynamic timestamp that is incoherent with the schema for the
table being read.
Release justification: fix to new functionality