You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Gabriella Lotz (Code Review)" <ge...@cloudera.org> on 2026/07/21 12:49:53 UTC

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Gabriella Lotz has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24613


Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................

KUDU-3760 expose follower-move flag in rebalancer

The follower-move preference added for the auto-rebalancer changed the
default of TwoDimensionalGreedyAlgo's constructor to prefer follower
moves. The CLI rebalance tool default-constructs that algorithm, so it
started preferring follower moves silently, with no way to turn it off.

Add a --rebalancing_prefer_follower_replica_moves flag (default true, to
match both the auto-rebalancer's flag and the new constructor default)
and plumb it through to the algorithm. This keeps the current behavior
but makes it explicit and overridable from the command line.

Adds a parameterized test that runs the tool with the flag set both ways
and checks the cluster still ends up balanced.

Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
---
M src/kudu/tools/rebalancer_tool-test.cc
M src/kudu/tools/rebalancer_tool.cc
2 files changed, 83 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/13/24613/1
-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 3:

Build Aborted 

http://jenkins.kudu.apache.org/job/pre_commit/2821/ : ABORTED


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 31 Jul 2026 21:13:56 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Zoltan Chovan, Alexey Serbin, Kudu Jenkins, Abhishek Chennaka, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/24613

to look at the new patch set (#3).

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................

KUDU-3760 expose follower-move flag in rebalancer

The follower-move preference added for the auto-rebalancer changed the
default of TwoDimensionalGreedyAlgo's constructor to prefer follower
moves. The CLI rebalance tool default-constructs that algorithm, so it
started preferring follower moves silently, with no way to turn it off.

Add a --rebalancing_prefer_follower_replica_moves flag (default true, to
match both the auto-rebalancer's flag and the new constructor default)
and plumb it through to the algorithm. This keeps the current behavior
but makes it explicit and overridable from the command line.

Adds a parameterized test that runs the tool with the flag set both ways
and checks the cluster still ends up balanced.

Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
---
M src/kudu/tools/rebalancer_tool-test.cc
M src/kudu/tools/rebalancer_tool.cc
2 files changed, 85 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/13/24613/3
-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/24613/2/src/kudu/tools/rebalancer_tool-test.cc
File src/kudu/tools/rebalancer_tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/24613/2/src/kudu/tools/rebalancer_tool-test.cc@795
PS2, Line 795: 
> q: this test guards that the CLI accepts the flag (an unregistered flag wou
You're right, thanks for flagging. I've updated the comment above the test to say this explicitly so future readers don't over-trust it.


http://gerrit.cloudera.org:8080/#/c/24613/2/src/kudu/tools/rebalancer_tool.cc
File src/kudu/tools/rebalancer_tool.cc:

http://gerrit.cloudera.org:8080/#/c/24613/2/src/kudu/tools/rebalancer_tool.cc@1346
PS2, Line 1346: deadline
> nit: this changed `std::move(deadline)` to `deadline` (plain copy) while th
Changed this because of clang-tidy:
kudu/src/kudu/tools/rebalancer_tool.cc:1346:23: warning: std::move of the variable 'deadline' of the trivially-copyable type 'optional<kudu::MonoTime>' has no effect; remove std::move() [performance-move-const-arg]
                      std::move(deadline)),
                      ^~~~~~~~~~        ~



-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 31 Jul 2026 08:51:59 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 4: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/2866/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 10 Aug 2026 15:38:43 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 1:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/2772/


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Tue, 21 Jul 2026 12:50:03 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 2: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/2806/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Jul 2026 10:46:16 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 2:

(2 comments)

Also a comment for a part which is not explicitly touched by this patch:
File: src/kudu/tools/tool_action_cluster.cc
Line: 455
Comment: The new --rebalancing_prefer_follower_replica_moves flag is not registered on the rebalance action via .AddOptionalParameter(). Every sibling rebalancer flag (load_imbalance_threshold, max_moves_per_server, disable_intra_location_rebalancing, move_single_replicas, ...) is listed here, which is what surfaces them in `kudu cluster rebalance --help` and in the generated flag/XML docs. As written the flag works (gflags parses it globally, which is why the test's s.ok() passes) but is invisible to --help and undocumented. Since the whole point of the commit is to make the option "explicit and overridable from the command line," shouldn't it be added here too? (AddOptionalParameter only needs the flag name at runtime, so no DECLARE is required even though it's DEFINE'd in rebalancer_tool.cc.)

http://gerrit.cloudera.org:8080/#/c/24613/2/src/kudu/tools/rebalancer_tool-test.cc
File src/kudu/tools/rebalancer_tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/24613/2/src/kudu/tools/rebalancer_tool-test.cc@795
PS2, Line 795: 
q: this test guards that the CLI accepts the flag (an unregistered flag would abort the tool) and that the cluster ends up balanced either way -- but as the comment notes, both flag values must produce a balanced cluster, so it would still pass even if the flag were plumbed to the wrong runner or ignored entirely. That's fine given rebalance_algo-test.cc covers the actual leader-vs-follower behavior; worth being aware the integration test's guard is weaker than it looks (it's really an "is-the-flag-wired-to-the-CLI" regression test, which matches the commit's stated intent).


http://gerrit.cloudera.org:8080/#/c/24613/2/src/kudu/tools/rebalancer_tool.cc
File src/kudu/tools/rebalancer_tool.cc:

http://gerrit.cloudera.org:8080/#/c/24613/2/src/kudu/tools/rebalancer_tool.cc@1346
PS2, Line 1346: deadline
nit: this changed `std::move(deadline)` to `deadline` (plain copy) while the sibling CrossLocationRunner/ReplaceBasedRunner ctors still `std::move(deadline)`. optional<MonoTime> is cheap to copy so it's harmless, but the change looks incidental and is now inconsistent with the neighbors -- was dropping the move intentional?



-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Thu, 30 Jul 2026 13:54:16 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................

KUDU-3760 expose follower-move flag in rebalancer

The follower-move preference added for the auto-rebalancer changed the
default of TwoDimensionalGreedyAlgo's constructor to prefer follower
moves. The CLI rebalance tool default-constructs that algorithm, so it
started preferring follower moves silently, with no way to turn it off.

Add a --prefer_follower_replica_moves flag (default true, to match both
the auto-rebalancer's flag and the new constructor default)
and plumb it through to the algorithm. This keeps the current behavior
but makes it explicit and overridable from the command line.

Adds a parameterized test that runs the tool with the flag set both ways
and checks the cluster still ends up balanced.

Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Reviewed-on: http://gerrit.cloudera.org:8080/24613
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Alexey Serbin <al...@apache.org>
---
M src/kudu/tools/rebalancer_tool-test.cc
M src/kudu/tools/rebalancer_tool.cc
M src/kudu/tools/tool_action_cluster.cc
3 files changed, 86 insertions(+), 2 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved; Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 5
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 2:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/2806/


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Jul 2026 10:08:50 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 4: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 12 Aug 2026 02:20:22 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 3:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/2821/


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Fri, 31 Jul 2026 08:51:54 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 3:

(1 comment)

> Thank you! Did you have a chance to take a look at my comment about
 > src/kudu/tools/tool_action_cluster.cc?

+1: please add the newly added flag via AddOptionalParameter() into ClusterActionBuilder, so the CLI tool displays help for the parameter when requested.

http://gerrit.cloudera.org:8080/#/c/24613/3/src/kudu/tools/rebalancer_tool.cc
File src/kudu/tools/rebalancer_tool.cc:

http://gerrit.cloudera.org:8080/#/c/24613/3/src/kudu/tools/rebalancer_tool.cc@106
PS3, Line 106: rebalancing_
Since this flag is exposed only through 'kudu cluster rebalance' CLI, consider naming this simply 'prefer_follower_replica_moves'.  I assume there isn't a conflict with other flags defined elsewhere.



-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 03 Aug 2026 18:27:56 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Zoltan Chovan, Alexey Serbin, Kudu Jenkins, Abhishek Chennaka, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/24613

to look at the new patch set (#4).

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................

KUDU-3760 expose follower-move flag in rebalancer

The follower-move preference added for the auto-rebalancer changed the
default of TwoDimensionalGreedyAlgo's constructor to prefer follower
moves. The CLI rebalance tool default-constructs that algorithm, so it
started preferring follower moves silently, with no way to turn it off.

Add a --prefer_follower_replica_moves flag (default true, to match both
the auto-rebalancer's flag and the new constructor default)
and plumb it through to the algorithm. This keeps the current behavior
but makes it explicit and overridable from the command line.

Adds a parameterized test that runs the tool with the flag set both ways
and checks the cluster still ends up balanced.

Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
---
M src/kudu/tools/rebalancer_tool-test.cc
M src/kudu/tools/rebalancer_tool.cc
M src/kudu/tools/tool_action_cluster.cc
3 files changed, 86 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/13/24613/4
-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/24613/3/src/kudu/tools/rebalancer_tool-test.cc
File src/kudu/tools/rebalancer_tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/24613/3/src/kudu/tools/rebalancer_tool-test.cc@734
PS3, Line 734: (an unregistered flag would abort the tool)
To cover the other side (i.e. keeping the registered flags documented), consider also adding a test for 'kudu cluster rebalance --help' output if you are have extra time to work on this.  As an example, take a look at http://gerrit.cloudera.org:8080/23555



-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 03 Aug 2026 18:53:07 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 4:

Build Started http://jenkins.kudu.apache.org/job/pre_commit/2866/


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 10 Aug 2026 14:48:37 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 4: Verified+1

unrelated test failure in RELEASE build: KUDU-3799


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Wed, 12 Aug 2026 02:20:17 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 3:

Thank you! Did you have a chance to take a look at my comment about src/kudu/tools/tool_action_cluster.cc?


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Sun, 02 Aug 2026 10:09:42 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has removed a vote on this change.

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 1: Verified-1

Build Failed 

http://jenkins.kudu.apache.org/job/pre_commit/2772/ : FAILURE


-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Tue, 21 Jul 2026 12:54:19 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-3760 expose follower-move flag in rebalancer

Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz has posted comments on this change. ( http://gerrit.cloudera.org:8080/24613 )

Change subject: KUDU-3760 expose follower-move flag in rebalancer
......................................................................


Patch Set 4:

(2 comments)

> Patch Set 3:
> 
> Thank you! Did you have a chance to take a look at my comment about src/kudu/tools/tool_action_cluster.cc?

Yes, I have updated it!

http://gerrit.cloudera.org:8080/#/c/24613/3/src/kudu/tools/rebalancer_tool-test.cc
File src/kudu/tools/rebalancer_tool-test.cc:

http://gerrit.cloudera.org:8080/#/c/24613/3/src/kudu/tools/rebalancer_tool-test.cc@734
PS3, Line 734: (an unregistered flag would abort the tool)
> To cover the other side (i.e. keeping the registered flags documented), con
Good idea, although it is broader than this change. I filed KUDU-3798 as a follow-up. Thanks for the pointer.


http://gerrit.cloudera.org:8080/#/c/24613/3/src/kudu/tools/rebalancer_tool.cc
File src/kudu/tools/rebalancer_tool.cc:

http://gerrit.cloudera.org:8080/#/c/24613/3/src/kudu/tools/rebalancer_tool.cc@106
PS3, Line 106: prefer_follo
> Since this flag is exposed only through 'kudu cluster rebalance' CLI, consi
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/24613
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f1b03da71b11af82f18ff9e20dcaa676b185645
Gerrit-Change-Number: 24613
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Chovan <zc...@cloudera.com>
Gerrit-Comment-Date: Mon, 10 Aug 2026 14:49:16 +0000
Gerrit-HasComments: Yes