You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Gabriella Lotz (Jira)" <ji...@apache.org> on 2026/04/02 13:12:00 UTC

[jira] [Updated] (KUDU-3730) Add observability metrics

     [ https://issues.apache.org/jira/browse/KUDU-3730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriella Lotz updated KUDU-3730:
---------------------------------
    Description: 
{*}File{*}: {{[src/kudu/master/auto_rebalancer.cc](src/kudu/master/auto_rebalancer.cc)}} (new {{METRIC_DEFINE_counter}} entries, mirroring the pattern in {{{}[src/kudu/master/ts_manager.cc:55](src/kudu/master/ts_manager.cc){}}})

Counters to add (server-entity scope):
 * {{auto_rebalancer_leader_moves_scheduled}} — incremented in {{ExecuteMoves()}} when the tablet selected by {{FindReplicas()}} came from {{tablet_uuids_src_leaders}} (i.e., no follower was available)

 * {{auto_rebalancer_follower_moves_scheduled}} — incremented when the tablet came from {{tablet_uuids_src}} (non-leader path)

 * {{auto_rebalancer_rounds_completed}} — incremented once per full rebalancing cycle at the end of the {{do \{ } while}} loop in {{Run()}}

 * {{auto_rebalancer_moves_scheduled_total}} — total replica moves handed to {{ExecuteMoves()}} across all rounds

The split between {{leader_moves}} and {{follower_moves}} requires knowing which path {{FindReplicas()}} took. The simplest approach: have {{FindReplicas()}} return a bool (or an enum) indicating whether the result was from the follower list or the leader-fallback list, and use that in the call site in {{{}ScheduleReplicaMove(){}}}.

> Add observability metrics
> -------------------------
>
>                 Key: KUDU-3730
>                 URL: https://issues.apache.org/jira/browse/KUDU-3730
>             Project: Kudu
>          Issue Type: Sub-task
>            Reporter: Gabriella Lotz
>            Assignee: Gabriella Lotz
>            Priority: Major
>
> {*}File{*}: {{[src/kudu/master/auto_rebalancer.cc](src/kudu/master/auto_rebalancer.cc)}} (new {{METRIC_DEFINE_counter}} entries, mirroring the pattern in {{{}[src/kudu/master/ts_manager.cc:55](src/kudu/master/ts_manager.cc){}}})
> Counters to add (server-entity scope):
>  * {{auto_rebalancer_leader_moves_scheduled}} — incremented in {{ExecuteMoves()}} when the tablet selected by {{FindReplicas()}} came from {{tablet_uuids_src_leaders}} (i.e., no follower was available)
>  * {{auto_rebalancer_follower_moves_scheduled}} — incremented when the tablet came from {{tablet_uuids_src}} (non-leader path)
>  * {{auto_rebalancer_rounds_completed}} — incremented once per full rebalancing cycle at the end of the {{do \{ } while}} loop in {{Run()}}
>  * {{auto_rebalancer_moves_scheduled_total}} — total replica moves handed to {{ExecuteMoves()}} across all rounds
> The split between {{leader_moves}} and {{follower_moves}} requires knowing which path {{FindReplicas()}} took. The simplest approach: have {{FindReplicas()}} return a bool (or an enum) indicating whether the result was from the follower list or the leader-fallback list, and use that in the call site in {{{}ScheduleReplicaMove(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)