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

backport-2.0: sql: stop using txn.OrigTimestamp to reset TableCollection #24874

Merged
merged 1 commit into from
Apr 18, 2018

Conversation

vivekmenezes
Copy link
Contributor

@vivekmenezes vivekmenezes commented Apr 17, 2018

Backport 1/1 commits from #23816.

/cc @cockroachdb/release


sql: Stop using txn.OrigTimestamp to reset TableCollection
We use the transaction OrigTimestamp to figure out if a
transaction is being retried, triggering a reset of
TableCollection. This logic would get triggered when
running PREPARE within a transaction, because PREPARE
uses it's own transaction and thus has a different
OrigTimestamp.

Removed this logic because transaction retries trigger
resetting the TableCollection in the new conn-executor code.

fixes #24578

Release note sql: fix PREPARE hanging when run in the same transaction
as a CREATE TABLE

possibly related #23718

We use the transaction OrigTimestamp to figure out if a
transaction is being retried, triggering a reset of
TableCollection. This logic would get triggered when
running PREPARE within a transaction, because PREPARE
uses it's own transaction and thus has a different
OrigTimestamp.

Removed this logic because transaction retries trigger
resetting the TableCollection in the new conn-executor code.

fixes cockroachdb#24578

Release note sql: fix PREPARE hanging when run in the same transaction
as a CREATE TABLE
@vivekmenezes vivekmenezes requested review from andreimatei and a team April 17, 2018 17:29
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@vivekmenezes
Copy link
Contributor Author

@andreimatei rubberstamp?

@andreimatei
Copy link
Contributor

LGTM

But a nit: please copy the commit message into the PR message (the merge commit message). I think the release notes script needs the release note there, and also it's much easier to find on github - otherwise you have to click a lot to get to any message.

And a question about the original PR - why was the prepare hanging exactly? Was it #24885?

@vivekmenezes
Copy link
Contributor Author

bors r+

@vivekmenezes
Copy link
Contributor Author

@andreimatei this is a fix for #24578

@vivekmenezes
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 18, 2018

Not awaiting review

craig bot pushed a commit that referenced this pull request Apr 18, 2018
24874: backport-2.0: sql: stop using txn.OrigTimestamp to reset TableCollection r=vivekmenezes a=vivekmenezes

Backport 1/1 commits from #23816.

/cc @cockroachdb/release

---

sql: Stop using txn.OrigTimestamp to reset TableCollection
We use the transaction OrigTimestamp to figure out if a
transaction is being retried, triggering a reset of
TableCollection. This logic would get triggered when
running PREPARE within a transaction, because PREPARE
uses it's own transaction and thus has a different
OrigTimestamp.

Removed this logic because transaction retries trigger
resetting the TableCollection in the new conn-executor code.

fixes #24578

Release note sql: fix PREPARE hanging when run in the same transaction
as a CREATE TABLE

possibly  related #23718 

Co-authored-by: Vivek Menezes <[email protected]>
@craig
Copy link
Contributor

craig bot commented Apr 18, 2018

Build succeeded

@craig craig bot merged commit 2e8349f into cockroachdb:release-2.0 Apr 18, 2018
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