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

optimize: skip check lock #101

Merged
merged 2 commits into from
Jan 28, 2022
Merged

optimize: skip check lock #101

merged 2 commits into from
Jan 28, 2022

Conversation

xjlgod
Copy link
Contributor

@xjlgod xjlgod commented Jan 21, 2022

ref: https://github.com/seata-golang/seata-golang/issues/

Ⅰ. Describe what this PR did

参考此issue提交
mysql那边的pr已经提交

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

pkg/tc/lock/lock_manager.go Outdated Show resolved Hide resolved
Copy link

@bohehe bohehe left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -1,6 +1,7 @@
package lock

import (
"encoding/json"

Choose a reason for hiding this comment

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

pls add a blank line after this lib

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I have done

if err != nil {
return locker.manager.AcquireLock(locks, false)
}
skipCheckLock := applicationDataMap["skipCheckLock"]

Choose a reason for hiding this comment

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

参考mysql那边的代码,这里好像只有skipCheckLock==false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经更改了,这里目前只会有skipCheckLock==true

@dk-lockdown dk-lockdown merged commit 7c56270 into apache:v2 Jan 28, 2022
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.

None yet

4 participants