mapleFU commented on code in PR #1219:
URL: 
https://github.com/apache/incubator-kvrocks/pull/1219#discussion_r1064543854


##########
src/server/server.cc:
##########
@@ -137,12 +137,17 @@ Status Server::Start() {
   }
 
   if (config_->cluster_enabled) {
+    auto s = cluster_->LoadClusterNodes(config_->NodesFilePath());

Review Comment:
   @git-hulk Let's dive into the code:
   1. Assume we write a lower version(version = 1) on Server A
   2. Server write and crash, topology changed, version = 2.
   3. Restart, and load with version = 1. The file is ok, then we call 
`SetClusterNodes` with `force = false`. So, return status not ok. So `Start` 
will failed



##########
src/server/server.cc:
##########
@@ -137,12 +137,17 @@ Status Server::Start() {
   }
 
   if (config_->cluster_enabled) {
+    auto s = cluster_->LoadClusterNodes(config_->NodesFilePath());

Review Comment:
   @git-hulk Let's dive into the code:
   1. Assume we write a lower version(version = 1) on Server A
   2. Server write and crash, topology changed, version = 2.
   3. Restart, and load with version = 1. The file is ok, then we call 
`SetClusterNodes` with `force = false`. So, return status not ok. So `Start` 
will failed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to