roachtest: Make election test work on release-2.0#26598
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Jun 11, 2018
Merged
roachtest: Make election test work on release-2.0#26598craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
The test was assuming the existence of a default database, which isn't present in 2.0. Fixes cockroachdb#26562 Release note: None
Member
Contributor
|
Review status: Comments from Reviewable |
Contributor
Author
|
bors r+ |
1 similar comment
Contributor
Author
|
bors r+ |
craig bot
pushed a commit
that referenced
this pull request
Jun 11, 2018
23055: kv: stop concerning the TxnCoordSender with abandoned txns r=andreimatei a=andreimatei Assorted cleanups of the client.Txn interface and the TxnCoordSender. See individual commits. The main point is the last one, which reads: kv: stop concerning the TxnCoordSender with abandoned txns … Before this patch, the TxnCoordSender had a role in cleaning up abandoned transactions, where abandoned was defined in a funky way: 1) for txns with a cancelable context, a txn was abandoned if the ctx had been canceled. 2) for the other txns, the txn was considered abandoned if it ran for 10 seconds. SQL only triggers 1). The 10 second timeout was a relicv of the past, from a time where the coordinator was possibly removed from the client. No more, they have been collocated for years. In fact, the whole idea of the TCS detecting abandoned txns is a relicv of that past: all the txn users are already always cleaning up after themselves. The pressing motivation for this change is that there's an issue with checking the context: there is currently no way to pass a ctx with the same lifetime as the txn to the TxnCoordSender (as it is only a Sender). And so the TCS was capturing the ctx of the first Send() op as the ctx of the txn: this was a major hack that's a big problem - we can't have per-statement contexts, for example. This also restricts the possible implementations of statement cancelation: we have been forced to cancel the whole transaction, which is not ideal. This patch removes TCS' involvement in cleanup by relying on the client to always send an EndTransaction. SQL was already doing that, as was everybody else. The TCS is simplified. The GCQueue maintains its role in detecting abandoned transactions - it coninues to do so with an one hour timeout. This detection is needed, of course, since the client is not collocated with the txn's range. This patch removes the txn.Abandons metric which was maintained by the TCS. There is a similar metric maintained by the GCQueue. The TCS one was incorrect anyway, as it was being incremented on ctx cancelation. Release note: None 26598: roachtest: Make election test work on release-2.0 r=a-robinson a=a-robinson The test was assuming the existence of a default database, which isn't present in 2.0. Fixes #26562 Release note: None Co-authored-by: Andrei Matei <andrei@cockroachlabs.com> Co-authored-by: Alex Robinson <alexdwanerobinson@gmail.com>
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.
The test was assuming the existence of a default database, which
isn't present in 2.0.
Fixes #26562
Release note: None