-
Notifications
You must be signed in to change notification settings - Fork 721
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
*: simplify raft cluster. #78
Conversation
|
||
func (s *testClusterCacheSuite) SetUpSuite(c *C) { | ||
s.svr = newTestServer(c, s.getRootPath()) | ||
|
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.
Remove empty line.
// cluster 1 -> /raft/1, value is metapb.Cluster | ||
// cluster 2 -> /raft/2 | ||
// cluster 1 -> /1/raft, value is metapb.Cluster | ||
// cluster 2 -> /1/raft |
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.
The comment should be /2/raft
?
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.
yep
LGTM |
@@ -21,6 +21,7 @@ var ( | |||
leaderLease = flag.Int64("lease", 3, "Leader lease time (second)") | |||
logLevel = flag.String("L", "debug", "log level: info, debug, warn, error, fatal") | |||
pprofAddr = flag.String("pprof", ":6060", "pprof HTTP listening address") | |||
clusterID = flag.Uint64("cluster-id", 0, "Cluster ID") |
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.
Maybe another default clusterID since 0 is for test.
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.
check 0 and panic?
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 make the default value to be 1 is enough.
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.
em, 1 seems strange, I prefer 0 if 1.
We can log a warning if we use 0. Btw for most cases, we use different root path not "/pd", so it is ok.
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.
Fine.
LGTM |
PTAL @ngaut |
LGTM |
* added get region by keyspace api Signed-off-by: David <[email protected]> * fix encoding Signed-off-by: David <[email protected]> * addd pd-ctl Signed-off-by: David <[email protected]> * change description Signed-off-by: David <[email protected]> * change pd-ctl command to add id Signed-off-by: David <[email protected]> * check keyspace id before fetch Signed-off-by: David <[email protected]> --------- Signed-off-by: David <[email protected]> Signed-off-by: lhy1024 <[email protected]>
* added get region by keyspace api Signed-off-by: David <[email protected]> * fix encoding Signed-off-by: David <[email protected]> * addd pd-ctl Signed-off-by: David <[email protected]> * change description Signed-off-by: David <[email protected]> * change pd-ctl command to add id Signed-off-by: David <[email protected]> * check keyspace id before fetch Signed-off-by: David <[email protected]> --------- Signed-off-by: David <[email protected]>
For #68
@ngaut @qiuyesuifeng @disksing