This is an automated email from the ASF dual-hosted git repository.

hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new a85eadd2 chore: move the migration initialized before calling 
LoadClusterNodes (#2820)
a85eadd2 is described below

commit a85eadd24c17acdca6553bb0544bba5afd9c3955
Author: Rivers <[email protected]>
AuthorDate: Fri Mar 7 19:23:02 2025 +0800

    chore: move the migration initialized before calling LoadClusterNodes 
(#2820)
---
 src/server/server.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/server/server.cc b/src/server/server.cc
index 395f972c..253a4802 100644
--- a/src/server/server.cc
+++ b/src/server/server.cc
@@ -176,14 +176,16 @@ Status Server::Start() {
   }
 
   if (config_->cluster_enabled) {
+    // Create objects used for slot migration
+    slot_migrator = std::make_unique<SlotMigrator>(this);
+
     if (config_->persist_cluster_nodes_enabled) {
       auto s = cluster->LoadClusterNodes(config_->NodesFilePath());
       if (!s.IsOK()) {
         return s.Prefixed("failed to load cluster nodes info");
       }
     }
-    // Create objects used for slot migration
-    slot_migrator = std::make_unique<SlotMigrator>(this);
+
     auto s = slot_migrator->CreateMigrationThread();
     if (!s.IsOK()) {
       return s.Prefixed("failed to create migration thread");

Reply via email to