-
Notifications
You must be signed in to change notification settings - Fork 719
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
id: fix the id allocator is not monotonic #3305
Conversation
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@@ -1223,6 +1223,10 @@ func (s *Server) campaignLeader() { | |||
log.Error("failed to load persistOptions from etcd", errs.ZapError(err)) | |||
return | |||
} | |||
if err := s.idAllocator.Generate(); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Generate
also needs mu.Lock
?
Codecov Report
@@ Coverage Diff @@
## master #3305 +/- ##
==========================================
- Coverage 74.71% 74.69% -0.02%
==========================================
Files 243 243
Lines 23207 23210 +3
==========================================
- Hits 17338 17337 -1
+ Misses 4292 4289 -3
- Partials 1577 1584 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/lgtm |
@hi-rustin: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/ti-community-prow repository. |
/merge |
@Yisaer: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/ti-community-prow repository. |
This pull request has been accepted and is ready to merge. Commit hash: ffe37d6
|
/run-cherry-picker |
cherry pick to release-5.0-rc in PR #3306 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
/run-cherry-picker |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-2.1 in PR #3307 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #3308 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-3.0 in PR #3309 |
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: Ryan Leung <rleungx@gmail.com>
* cherry pick #3305 to release-5.0-rc Signed-off-by: Ryan Leung <rleungx@gmail.com> * cherry pick #3322 to release-5.0-rc Signed-off-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: ShuNing <nolouch@gmail.com> Co-authored-by: Ti Prow Robot <71242396+ti-community-prow-bot@users.noreply.github.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
What problem does this PR solve?
What is changed and how it works?
This PR tries to make the id monotonic since there are many components that depend on this property. ref: #3303
Check List
Tests
Related changes
pingcap/docs
/pingcap/docs-cn
:pingcap/tidb-ansible
:Release note