[
https://issues.apache.org/jira/browse/KUDU-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18087678#comment-18087678
]
ASF subversion and git services commented on KUDU-3732:
-------------------------------------------------------
Commit 43dc5b1fea55e2b819205a7962c083ddf34884f3 in kudu's branch
refs/heads/master from Gabriella Lotz
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=43dc5b1fe ]
KUDU-3732 Get consensus state from CatalogManager in auto-rebalancer
AutoRebalancerTask::CheckMoveCompleted() previously issued a
GetConsensusState RPC to the tablet leader on every polling cycle
to check whether a replica move had completed. Replace this RPC with
a read from CatalogManager, which is populated via tserver-to-master
heartbeats.
ExecuteMoves now records the committed config opid_index from
CatalogManager before sending BulkChangeConfig, storing it in
ReplicaMove.config_opid_idx. CheckMoveCompleted uses this as a
freshness gate: if the opid_index in CatalogManager has not advanced
past the stored value, the heartbeat carrying the new config has not
yet arrived and the check waits rather than applying completion or
error logic.
Add CatalogManager::GetTabletConsensusState() to expose the
committed consensus state from the in-memory tablet map.
Change-Id: Iba021539fbfaca5905fbbf4abbb6e2a61db1f7dc
Reviewed-on: http://gerrit.cloudera.org:8080/24285
Reviewed-by: Alexey Serbin <[email protected]>
Reviewed-by: Marton Greber <[email protected]>
Tested-by: Marton Greber <[email protected]>
> Get consensus state from CatalogManager
> ---------------------------------------
>
> Key: KUDU-3732
> URL: https://issues.apache.org/jira/browse/KUDU-3732
> Project: Kudu
> Issue Type: Sub-task
> Reporter: Gabriella Lotz
> Assignee: Gabriella Lotz
> Priority: Major
>
> h2. Address the two existing TODOs
> Both are in
> {{{}[src/kudu/master/auto_rebalancer.cc](src/kudu/master/auto_rebalancer.cc){}}}:
> {*}TODO 1 (line 478){*}: {{remove moves that fail to be scheduled from
> 'replica_moves'}}
> Currently {{ExecuteMoves()}} iterates all moves but does not remove
> failed-to-schedule moves. Failed moves stay in the in-progress set, blocking
> future rounds from reconsidering those tablets. Fix: collect scheduling
> failures and erase them from {{replica_moves}} before returning, so
> {{CheckReplicaMovesCompleted}} only waits on actually-submitted moves.
> {*}TODO 2 (line 853){*}: {{Retrieve consensus state from CatalogManager
> instead}}
> {{CheckMoveCompleted()}} currently mirrors the tool-side
> {{CheckCompleteMove()}} — it issues RPCs. The better path reads consensus
> state from the master's in-memory catalog (already available via
> {{{}CatalogManager{}}}), eliminating the extra RPC round-trip per move. The
> implementation pattern exists in {{{}CatalogManager::GetTabletLocations{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)