-
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
storage: declare correct key for QueryTxn request #23996
Merged
nvanbenschoten
merged 1 commit into
cockroachdb:master
from
nvanbenschoten:nvanbenschoten/fixSpanSet
Mar 19, 2018
Merged
storage: declare correct key for QueryTxn request #23996
nvanbenschoten
merged 1 commit into
cockroachdb:master
from
nvanbenschoten:nvanbenschoten/fixSpanSet
Mar 19, 2018
Conversation
This file contains 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
Fixes cockroachdb#23944. This change corrects QueryTxn so that it now correctly declares the key that it reads from. This is important because the previous incorrect declaration allowed for improper CommandQueue synchronization with other requests that touch the transaction record. There were two approaches we could take here: - Map the requests header.Key to the correct key - Append the txnID to header.Key This change goes with the former approach because it does not have any compatibility concerns and because it is consistent with what we do for PushTxn requests. Release note: None
nvanbenschoten
added a commit
to nvanbenschoten/cockroach
that referenced
this pull request
Mar 17, 2018
Before this change, we only performed SpanSet assertions on read-write requests. This was a pretty huge oversight and is what allowed cockroachdb#23944 to slip in. This change fixes this by adding a `engine.ReadWriter` spanset variant and using it for read-only requests while in race mode. It is currently blocked on cockroachdb#23996 and the revival of cockroachdb#18579. Release note: None
Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
nvanbenschoten
added a commit
to nvanbenschoten/cockroach
that referenced
this pull request
Mar 19, 2018
Before this change, we only performed SpanSet assertions on read-write requests. This was a pretty huge oversight and is what allowed cockroachdb#23944 to slip in. This change fixes this by adding a `engine.ReadWriter` spanset variant and using it for read-only requests while in race mode. It is currently blocked on cockroachdb#23996 and the revival of cockroachdb#18579. Release note: None
nvanbenschoten
added a commit
to nvanbenschoten/cockroach
that referenced
this pull request
Mar 19, 2018
Before this change, we only performed SpanSet assertions on read-write requests. This was a pretty huge oversight and is what allowed cockroachdb#23944 to slip in. This change fixes this by adding a `engine.ReadWriter` spanset variant and using it for read-only requests while in race mode. It is currently blocked on cockroachdb#23996 and the revival of cockroachdb#18579. Release note: None
craig bot
added a commit
that referenced
this pull request
Apr 5, 2018
24046: backport-2.0: storage: perform SpanSet assertions on read-only requests r=nvanbenschoten a=nvanbenschoten Backport 1/1 commits from #23997. /cc @cockroachdb/release --- Before this change, we only performed SpanSet assertions on read-write requests. This was a pretty huge oversight and is what allowed #23944 to slip in. This change fixes this by adding an `engine.ReadWriter` spanset variant and using it for read-only requests while in race mode. It is currently blocked on #23996 and the revival of #18579. This is actually good news, as it means that no other spanset violations have crept in while this assertion was missing. First commit is from #23996. Release note: None
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 #23944.
This change corrects QueryTxn so that it now correctly declares the
key that it reads from. This is important because the previous
incorrect declaration allowed for improper CommandQueue synchronization
with other requests that touch the transaction record.
There were two approaches we could take here:
This change goes with the former approach because it does not have any
compatibility concerns and because it is consistent with what we do
for PushTxn requests.
Release note: None