-
Notifications
You must be signed in to change notification settings - Fork 304
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
Always match the newest store when matching by address #579
Conversation
logically, only the store id identify a store. if normally scale-in a store and scale-out using the same ip:port, then there's will not only one store with the same address. also, this pr fix the tidbSpec initialize which we must make sure initiaize the profile dir first.
Codecov Report
@@ Coverage Diff @@
## master #579 +/- ##
===========================================
+ Coverage 39.84% 50.54% +10.69%
===========================================
Files 201 219 +18
Lines 14847 15888 +1041
===========================================
+ Hits 5916 8030 +2114
+ Misses 8072 6738 -1334
- Partials 859 1120 +261
Continue to review full report at Codecov.
|
pkg/cluster/spec/util.go
Outdated
clusterBaseDir := filepath.Join(profileDir, TiOpsClusterDir) | ||
clusterSpec := meta.NewSpec(clusterBaseDir) | ||
return clusterSpec | ||
tidbSpec = meta.NewSpec(clusterBaseDir) |
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.
How about putting tidbSpec = meta.NewSpec(clusterBaseDir)
into Initialize
function directly?
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.
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
@lonng,Thanks for your review. |
/merge |
/run-all-tests |
logically, only the store id identify a store.
if normally scale-in a store and scale-out using the same ip:port,
then there's will not only one store with the same address.
before this pr, only some API will match the newest store, this pr make sure all API match the newest store when matching by address.
also, this pr fix the tidbSpec initialize which we must make sure
initiaize the profile dir first.