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

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new eee765e  [master] fix misprint in VerifyMastersGetHostPorts()
eee765e is described below

commit eee765e8f9164f9b4a76b5fc98e7bae77dba83d9
Author: Alexey Serbin <[email protected]>
AuthorDate: Fri Sep 10 22:23:43 2021 -0700

    [master] fix misprint in VerifyMastersGetHostPorts()
    
    There was a misprint in the VerifyMastersGetHostPorts() function
    used in multi-master startup -- 'return Status::OK()' line was missing
    in the 'if()' clause when the masters don't agree on the current Raft
    config's index.
    
    Kotomi from #getkudu community Slack found and reported this issue.
    Thank you for the contribution!
    
    Change-Id: I8e2d623ac09bb0eb8e25e1a38cfba6b5b9819c78
    Reviewed-on: http://gerrit.cloudera.org:8080/17844
    Tested-by: Kudu Jenkins
    Reviewed-by: Andrew Wong <[email protected]>
---
 src/kudu/master/master_runner.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/master/master_runner.cc b/src/kudu/master/master_runner.cc
index f4c194a..fffd28f 100644
--- a/src/kudu/master/master_runner.cc
+++ b/src/kudu/master/master_runner.cc
@@ -249,6 +249,7 @@ Status VerifyMastersGetHostPorts(const vector<HostPort>& 
master_addrs,
       LOG(INFO) << Substitute("Existing masters have differing Raft config 
indexes: $0 vs $1",
                               committed_config_index, 
cstate.committed_config().opid_index());
       *needs_retry = true;
+      return Status::OK();
     }
     const auto& config = cstate.committed_config();
     set<string> uuids;
@@ -256,7 +257,6 @@ Status VerifyMastersGetHostPorts(const vector<HostPort>& 
master_addrs,
       EmplaceIfNotPresent(&uuids, p.permanent_uuid());
     }
     each_remote_masters_master_uuids.emplace_back(std::move(uuids));
-
   }
   if (!leader_hp->Initialized()) {
     LOG(INFO) << Substitute("No leader master found from master $0", 
local_uuid);

Reply via email to