Skip to content

roachpb/storage: complete removal of BeginTransactionRequest#42933

Merged
craig[bot] merged 3 commits intocockroachdb:masterfrom
nvb:nvanbenschoten/remBeginTxn
Dec 4, 2019
Merged

roachpb/storage: complete removal of BeginTransactionRequest#42933
craig[bot] merged 3 commits intocockroachdb:masterfrom
nvb:nvanbenschoten/remBeginTxn

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Dec 4, 2019

This commit completes the migration started in #32971 (a year ago to the week). It removes all references to BeginTransactionRequest and deletes the request type entirely. This reduces the number of request types that can create transaction records down to just two: EndTransactionRequest and HeartbeatTxnRequest (see the state transition diagram in replica_tscache.go).

It is safe to remove server-side handling of BeginTransactionRequest because we never use it in v19.2 binaries, so v20.1 binaries will never run in a cluster that is using the request type.

Once this commit is merged, I'm going to s/EndTransaction/EndTxn/g to bring that request name in line with all other transaction metadata requests (e.g. HeartbeatTxnRequest, PushTxnRequest, QueryTxnRequest, and RecoverTxnRequest).

@nvb nvb requested a review from tbg December 4, 2019 05:03
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@nvb nvb force-pushed the nvanbenschoten/remBeginTxn branch from 97e0941 to 6a1bc91 Compare December 4, 2019 05:54
Copy link
Copy Markdown
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: 🎆

Reviewed 1 of 1 files at r1, 2 of 2 files at r2, 28 of 28 files at r3.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @nvanbenschoten)


pkg/storage/client_merge_test.go, line 1227 at r2 (raw file):

desctiptor

nvb added 3 commits December 4, 2019 14:13
This was no longer true, as of cockroachdb#41104.

Release note: None
TestStoreRangeMergeSplitRace_MergeWins was just missing a bit of cleanup that
was made possible by 519bb56.

TestStoreRangeMergeSplitRace_SplitWins was more badly broken. It hasn't been
working for over a year and because it was broken by both 352bdf4 and 68267f1.
The first commit broke the range descriptor key it expected the BeginTxn req
to have and the second commit stopped sending BeginTxns entirely.

However, I'm not sure how it ever worked. The test blocked intent resolution
until it finished, but intent resolution on the split's meta2 intent was
needed to allow the merge to proceed. My only thought is that the merge
was never succeeding and was always hitting the "range changed during merge"
error, so the test worked fine.

Regardless, this commit fixes and cleans up both tests. I verified that I could
reproduce the race conditions described by each of these tests after the
fixup/cleanup.

Release note: None
This commit completes the migration started in cockroachdb#32971 (a year ago to the week).
It removes all references to `BeginTransactionRequest` and deletes the request
type entirely. This reduces the number of request types that can create transaction
records down to just two: `EndTransactionRequest` and `HeartbeatTxnRequest` (see
the state transition diagram in `replica_tscache.go`).

It is safe to remove server-side handling of `BeginTransactionRequest` because we
never use it in v19.2 binaries, so v20.1 binaries will never run in a cluster that
is using the request type.

Once this commit is merged, I'm going to `s/EndTransaction/EndTxn/g` to bring
that request name in line with all other transaction metadata requests (e.g.
`HeartbeatTxnRequest`, `PushTxnRequest`, `QueryTxnRequest`, and `RecoverTxnRequest`).

Release note: None
@nvb nvb force-pushed the nvanbenschoten/remBeginTxn branch from 6a1bc91 to 128b076 Compare December 4, 2019 19:14
Copy link
Copy Markdown
Contributor Author

@nvb nvb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @tbg)


pkg/storage/client_merge_test.go, line 1227 at r2 (raw file):

Previously, tbg (Tobias Grieger) wrote…
desctiptor

Done.

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 4, 2019

Build failed

@nvb
Copy link
Copy Markdown
Contributor Author

nvb commented Dec 4, 2019

Flaked on #42098.

bors r+

craig bot pushed a commit that referenced this pull request Dec 4, 2019
42933: roachpb/storage: complete removal of BeginTransactionRequest r=nvanbenschoten a=nvanbenschoten

This commit completes the migration started in #32971 (a year ago to the week). It removes all references to `BeginTransactionRequest` and deletes the request type entirely. This reduces the number of request types that can create transaction records down to just two: `EndTransactionRequest` and `HeartbeatTxnRequest` (see the state transition diagram in `replica_tscache.go`).

It is safe to remove server-side handling of `BeginTransactionRequest` because we never use it in v19.2 binaries, so v20.1 binaries will never run in a cluster that is using the request type.

Once this commit is merged, I'm going to `s/EndTransaction/EndTxn/g` to bring that request name in line with all other transaction metadata requests (e.g. `HeartbeatTxnRequest`, `PushTxnRequest`, `QueryTxnRequest`, and `RecoverTxnRequest`).

Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 4, 2019

Build succeeded

@craig craig bot merged commit 128b076 into cockroachdb:master Dec 4, 2019
nvb added a commit to nvb/cockroach that referenced this pull request Dec 27, 2019
This commit renames all references to EndTransaction to EndTxn.
This brings the name in line with all other transaction metadata
requests (e.g. HeartbeatTxnRequest, PushTxnRequest, QueryTxnRequest,
and RecoverTxnRequest), as was discussed in cockroachdb#42933. It also removes
a lot of visual noise wherever the request type is used.

All comments modified were re-wrapped to 80 characters.

Release note: None
craig bot pushed a commit that referenced this pull request Dec 27, 2019
43387: *: rename roachpb.EndTransactionRequest to EndTxnRequest r=nvanbenschoten a=nvanbenschoten

This commit renames all references to `EndTransaction` to `EndTxn`. This brings the name in line with all other transaction metadata requests (e.g. `HeartbeatTxnRequest`, `PushTxnRequest`, `QueryTxnRequest`, and `RecoverTxnRequest`), as was discussed in #42933. It also removes a lot of visual noise wherever the request type is used.

All comments modified were re-wrapped to 80 characters.

Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
@nvb nvb deleted the nvanbenschoten/remBeginTxn branch December 27, 2019 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants