Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
pdms: support primary/transfer api for scheduling and tso #8157
pdms: support primary/transfer api for scheduling and tso #8157
Changes from 8 commits
7fa19d3
1f13fa2
af995cc
8d36be5
2433f0c
dd72b9c
a39300e
51708b5
c6d2bc3
a4c5c29
4d0598f
6ac311f
510b92a
b235bc1
f659782
32b0b5f
dbc5447
204ffd5
ec8e737
9e3b798
e53844e
cc82e7b
19ce9d8
4c7f8ac
36b5a82
ea8d9e3
ffb7b1b
379b1f6
d9bffb8
d037a6a
e711fd9
d999c7f
7f0a426
d810ed1
43830ec
2d9a3b0
c1da5b5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 919 in client/http/interface.go
Codecov / codecov/patch
client/http/interface.go#L919
Check warning on line 78 in pkg/election/leadership.go
Codecov / codecov/patch
pkg/election/leadership.go#L77-L78
Check warning on line 81 in pkg/mcs/discovery/discover.go
Codecov / codecov/patch
pkg/mcs/discovery/discover.go#L81
Check warning on line 89 in pkg/mcs/discovery/discover.go
Codecov / codecov/patch
pkg/mcs/discovery/discover.go#L89
Check warning on line 94 in pkg/mcs/discovery/discover.go
Codecov / codecov/patch
pkg/mcs/discovery/discover.go#L94
Check warning on line 103 in pkg/mcs/discovery/discover.go
Codecov / codecov/patch
pkg/mcs/discovery/discover.go#L103
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.
secondaryValues sounds strange.
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.
changed to memberValues
Check warning on line 117 in pkg/mcs/discovery/discover.go
Codecov / codecov/patch
pkg/mcs/discovery/discover.go#L117
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.
If the transaction takes a long time here, will it be possible to make the lease expire unexpectedly?
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.
We give lease 3 seconds.
TestTransferPrimaryWhileLeaseExpired
https://github.com/tikv/pd/pull/8157/files#diff-5a1f6bff4bb6b99fcd2f7bf4edc37aa937e8c51eafa41acc0aabd7aa1a1d1da6R267
Check warning on line 134 in pkg/mcs/discovery/discover.go
Codecov / codecov/patch
pkg/mcs/discovery/discover.go#L134
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.
@niubell PTAL, thx!
Check warning on line 133 in pkg/mcs/scheduling/server/server.go
Codecov / codecov/patch
pkg/mcs/scheduling/server/server.go#L132-L133
Check warning on line 338 in pkg/mcs/scheduling/server/server.go
Codecov / codecov/patch
pkg/mcs/scheduling/server/server.go#L337-L338
Check warning on line 360 in pkg/mcs/scheduling/server/server.go
Codecov / codecov/patch
pkg/mcs/scheduling/server/server.go#L359-L360
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.
Shall we need a default name?
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.
default name set by this code, which is like
TSO-localhost
pd/pkg/mcs/tso/server/config.go
Lines 185 to 195 in a39300e
And your commented snippet is for testing to avoid using the same name for the same machine for local testing, I used addr here
pd/tests/testutil.go
Lines 87 to 88 in 51708b5
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.
got