-
Notifications
You must be signed in to change notification settings - Fork 173
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
consul lock #140
consul lock #140
Conversation
@seeflood |
Codecov Report
@@ Coverage Diff @@
## main #140 +/- ##
=======================================
Coverage 56.90% 56.90%
=======================================
Files 48 48
Lines 2100 2100
=======================================
Hits 1195 1195
Misses 774 774
Partials 131 131 Continue to review full report at Codecov.
|
抱歉这周事(kai hui)太多,我明天看下! |
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
刚发现这个被机器人自动关了,@ZLBer 这个你还继续搞么~ |
@seeflood 时间有点久了..当时是有什么问题吗 |
@ZLBer 噢噢当时的遗留问题就是能否不用事务,因为用事务可能会有很多overhead |
@seeflood 我这几天看下 |
# Conflicts: # components/go.mod # components/go.sum
@seeflood 看了一下之前的方案确实麻烦了。unlock的时候可以直接删除session,这样和他绑定的lock就被释放掉了。但可能返回的状态不会很精确 ,比如没法区分 |
@ZLBer 我查了下,用 |
@seeflood release操作 LOCK_SUCCESS和LOCK_UNEXIST返回true,LOCK_BELONG_TO_OTHER返回false,无法区分前两种,倒是也没有太大影响。之前确实考虑太多了,那我就用最简单的acquire和release来重写? |
@ZLBer 好呀
恩这两个区分不了倒还好,就当LOCK_SUCCESS就行 |
@ZLBer
|
@zhenjunMa @seeflood Done |
@ZLBer Good job! thanks! |
What this PR does:
add consul lock
Which issue(s) this PR fixes:
Fixes #129
Special notes for your reviewer:
@seeflood
Does this PR introduce a user-facing change?: