Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24525 )
Change subject: KUDU-3789 auto_rebalancer: reliably clear replace marker after failed moves ...................................................................... Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/24525/2/src/kudu/master/auto_rebalancer.cc File src/kudu/master/auto_rebalancer.cc: http://gerrit.cloudera.org:8080/#/c/24525/2/src/kudu/master/auto_rebalancer.cc@885 PS2, Line 885: // Either the peer is already gone from the config (NotFound), or the : // marker is already cleared so the no-op MODIFY_PEER was rejected : // (InvalidArgument). Both mean there's nothing left to do. : if (clear_replace_status.IsNotFound() || : clear_replace_status.IsInvalidArgument()) { : clear_replace_status = Status::OK(); : break; : } IIUC, AutoRebalancerTask::GetTabletLeader() (which is a part of AutoRebalancerTask::TryClearReplaceMarker()) can intermittently return Status::NotFound() when no replica is a leader: that can happen during election rounds, etc. Are we OK with bailing out and not removing the marker in such a case? http://gerrit.cloudera.org:8080/#/c/24525/2/src/kudu/master/auto_rebalancer.cc@1102 PS2, Line 1102: // Without catalog leadership we can't resolve tablet leaders, and any : // marker we left behind is now the new leader's responsibility. : { : CatalogManager::ScopedLeaderSharedLock l(catalog_manager_); Once exited from this scope, how do we know that we are still the leader to call TryClearReplaceMarker() below? What if the leadership changes right after releasing this lock -- does the code below behaves as expected? -- To view, visit http://gerrit.cloudera.org:8080/24525 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia47698207612252bca3ec70fc090a37bd3f87809 Gerrit-Change-Number: 24525 Gerrit-PatchSet: 2 Gerrit-Owner: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Martonka <[email protected]> Gerrit-Comment-Date: Fri, 10 Jul 2026 18:49:53 +0000 Gerrit-HasComments: Yes
