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

transaction: allow cleanup after the connection is killed (WIP, DNM) #1424

Closed
wants to merge 1 commit into from

Conversation

YangKeao
Copy link
Member

This PR fixed two issues:

  1. The cleanup logic doesn't take effect for the commit in async commit stage. (Though, I'm not sure whether it's a mistake or by design. It seems good now.)
  2. Allow cleanup to run after the connection is killed. This makes it possible to clean up the lock before TiDB shutdown.

@@ -1638,6 +1644,10 @@ func (c *twoPhaseCommitter) execute(ctx context.Context) (err error) {
return err
}

if c.txn.resourceGroupName == "testslowcommit" {
Copy link
Member Author

@YangKeao YangKeao Aug 14, 2024

Choose a reason for hiding this comment

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

Some dirty codes for test. @YangKeao please remember to remove it later.

@YangKeao
Copy link
Member Author

YangKeao commented Sep 4, 2024

It's better to add hooks to wait for background goroutines. #1432.

This PR doesn't work, and I'm not going to investigate it. Close now.

@YangKeao YangKeao closed this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the dco.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant