[ 
https://issues.apache.org/jira/browse/KUDU-3791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119086#comment-18119086
 ] 

ASF subversion and git services commented on KUDU-3791:
-------------------------------------------------------

Commit f54a74dbda21190564f0b7dc57dcf6625452debf in kudu's branch 
refs/heads/master from Gabriella Lotz
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=f54a74dbd ]

KUDU-3791 add metrics for auto-leader-rebalancer

Before this change, log grepping was the only way to see what the
auto-leader-rebalancer was doing. Adds six counters on the master:

- auto_leader_rebalancer_moves_scheduled
- auto_leader_rebalancer_moves_completed
- auto_leader_rebalancer_moves_failed
- auto_leader_rebalancer_rounds_completed
- auto_leader_rebalancer_global_pass_skipped
- auto_leader_rebalancer_task_errors (MetricLevel::kWarn)

Naming and units mirror the counters AutoRebalancerTask already
exposes, so the two tasks read as a matched pair on /metrics.

The three move counters keep the invariant

    moves_scheduled = moves_completed + moves_failed

over transfers we actually tried, i.e. once we've committed to
sending the LeaderStepDown RPC. Planned moves that turn out to be
stale by the time we get to executing (source tserver deregistered,
destination now in maintenance mode) are skipped without touching
any of the three.

task_errors is warn-severity and meant as the main alerting signal.
It's bumped in RunLoop() when RunLeaderRebalancer() returns an
unexpected error. Losing catalog-manager leadership mid-round is
now swallowed like the first ScopedLeaderSharedLock check already
does, so a leader flap on its own doesn't bump the counter.

Adds a LeaderRebalancerTest.RebalancerMetrics test that exercises
all six counters and asserts the invariant.

Change-Id: I49b86e59043a7f652d4f556b94582bb74c5698ad
Reviewed-on: http://gerrit.cloudera.org:8080/24694
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
Reviewed-by: Marton Greber <[email protected]>


> Address TODOs in auto_leader_rebalancer.cc
> ------------------------------------------
>
>                 Key: KUDU-3791
>                 URL: https://issues.apache.org/jira/browse/KUDU-3791
>             Project: Kudu
>          Issue Type: Sub-task
>            Reporter: Gabriella Lotz
>            Assignee: Gabriella Lotz
>            Priority: Major
>
> # Add metrics line: 472, 834, 842
>  # Make step-down RPCs async line: 410



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

Reply via email to