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

Fix the problem that statement being oom-killed within DoneAggressiveLocking causing the transaction still in aggressive locking state #1355

Conversation

MyonKeminta
Copy link
Contributor

@MyonKeminta MyonKeminta commented May 29, 2024

This is a quick fix to avoid the transaction being left in aggressive locking state after panicking in DoneAggressiveLocking. While I haven't decide how to fix it in the most elegant approach, there should be a quick fix to avoid the problem, so that we have time to find the final solution more carefully.

Ref: pingcap/tidb#53540 (comment) , pingcap/tidb#53540 (comment)

…essiveLocking causing the transaction still in aggressive locking state

Signed-off-by: MyonKeminta <[email protected]>
cfzjywxk

This comment was marked as duplicate.

@@ -957,6 +957,11 @@ func (txn *KVTxn) CancelAggressiveLocking(ctx context.Context) {
if txn.aggressiveLockingContext == nil {
panic("Trying to cancel aggressive locking while it's not started")
}

defer func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could add some comments about it, maybe we could restore it after the more elegant solution is merged.

@MyonKeminta MyonKeminta requested a review from cfzjywxk May 30, 2024 07:56
@cfzjywxk cfzjywxk merged commit a6335a5 into tikv:master May 30, 2024
10 checks passed
@MyonKeminta MyonKeminta deleted the m/quick-fix-oom-panic-on-done-aggressive-locking branch May 31, 2024 02:13
@ti-chi-bot ti-chi-bot added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Jul 11, 2024
MyonKeminta added a commit to MyonKeminta/client-go that referenced this pull request Jul 16, 2024
…Locking causing the transaction still in aggressive locking state (tikv#1355)

* Quick fix the problem that statement being oom-killed within DoneAggressiveLocking causing the transaction still in aggressive locking state

Signed-off-by: MyonKeminta <[email protected]>

* Add comments to explain the change

Signed-off-by: MyonKeminta <[email protected]>

---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
cfzjywxk pushed a commit that referenced this pull request Jul 16, 2024
…Locking causing the transaction still in aggressive locking state (#1355) (#1390)

* Quick fix the problem that statement being oom-killed within DoneAggressiveLocking causing the transaction still in aggressive locking state



* Add comments to explain the change



---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
MyonKeminta added a commit to MyonKeminta/client-go that referenced this pull request Aug 1, 2024
…Locking causing the transaction still in aggressive locking state (tikv#1355)

* Quick fix the problem that statement being oom-killed within DoneAggressiveLocking causing the transaction still in aggressive locking state

Signed-off-by: MyonKeminta <[email protected]>

* Add comments to explain the change

Signed-off-by: MyonKeminta <[email protected]>

---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
cfzjywxk pushed a commit that referenced this pull request Aug 1, 2024
…Locking causing the transaction still in aggressive locking state (#1355) (#1412)

* Quick fix the problem that statement being oom-killed within DoneAggressiveLocking causing the transaction still in aggressive locking state



* Add comments to explain the change



---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
MyonKeminta added a commit to MyonKeminta/client-go that referenced this pull request Nov 8, 2024
…Locking causing the transaction still in aggressive locking state (tikv#1355)

* Quick fix the problem that statement being oom-killed within DoneAggressiveLocking causing the transaction still in aggressive locking state

Signed-off-by: MyonKeminta <[email protected]>

* Add comments to explain the change

Signed-off-by: MyonKeminta <[email protected]>

---------

Signed-off-by: MyonKeminta <[email protected]>
Co-authored-by: MyonKeminta <[email protected]>
ti-chi-bot bot pushed a commit that referenced this pull request Nov 8, 2024
…Locking causing the transaction still in aggressive locking state (#1355) (#1487)

 

Co-authored-by: MyonKeminta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants