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

integrate delay-clean-table-lock #904

Closed
marsishandsome opened this issue Jul 4, 2019 · 0 comments · Fixed by #905
Closed

integrate delay-clean-table-lock #904

marsishandsome opened this issue Jul 4, 2019 · 0 comments · Fixed by #905
Assignees

Comments

@marsishandsome
Copy link
Collaborator

marsishandsome commented Jul 4, 2019

see pingcap/tidb#11038

The logic of TiSpark to use the table lock is:

  1. lock table
  2. prewrite data.
  3. check whether the locked table session is closed.
  4. if the session doesn't close, do commit.
  5. if the session was closed by unexpected, do a rollback.

The problem is, What if the session was closed by unexpected between step 3 and 4, It will cause some problem.

TiSpark need to delayed release table lock before do commit.

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 a pull request may close this issue.

1 participant