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/04/14 16:47:14 UTC
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Gabriella Lotz has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24191
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
[auto_rebalancer] address TODO in ExecuteMoves()
Remove moves that fail to be scheduled from replica_moves
instead of early-returning on the first error. The old code
used RETURN_NOT_OK inside a const-ref loop, leaving unscheduled
moves in the vector and causing CheckReplicaMovesCompleted to
wait on them indefinitely.
ExecuteMoves now takes replica_moves by pointer and handles each
failure per-move: log a warning and erase the move before
returning, so only successfully submitted moves remain.
Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
---
M src/kudu/master/auto_rebalancer-test.cc
M src/kudu/master/auto_rebalancer.cc
M src/kudu/master/auto_rebalancer.h
3 files changed, 109 insertions(+), 87 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/24191/1
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 4:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/24191/3/src/kudu/master/auto_rebalancer-test.cc
File src/kudu/master/auto_rebalancer-test.cc:
http://gerrit.cloudera.org:8080/#/c/24191/3/src/kudu/master/auto_rebalancer-test.cc@1029
PS3, Line 1029: ASSERT_EVENTUALLY([&] {
: ASSERT_LT(initial_loops + 1, NumLoopIterations(leader_idx));
: ASSERT_GT(NumMovesAttempted(leader_idx), 0);
: ASSERT_EQ(0, NumMovesScheduled(leader_idx));
: });
> couldn't this assertion pass before ExecuteMoves() is finished? in auto_reb
Done
http://gerrit.cloudera.org:8080/#/c/24191/3/src/kudu/master/auto_rebalancer.h
File src/kudu/master/auto_rebalancer.h:
http://gerrit.cloudera.org:8080/#/c/24191/3/src/kudu/master/auto_rebalancer.h@135
PS3, Line 135: are logged individually;
> this method no longer returns a status
Done
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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 Apr 2026 15:12:26 +0000
Gerrit-HasComments: Yes
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
http://gerrit.cloudera.org:8080/#/c/24191/2/src/kudu/master/auto_rebalancer-test.cc
File src/kudu/master/auto_rebalancer-test.cc:
http://gerrit.cloudera.org:8080/#/c/24191/2/src/kudu/master/auto_rebalancer-test.cc@1024
PS2, Line 1024: at least one more iteration ran
Nit: the comment should say "at least two more iterations" to match the assertion.
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Thu, 23 Apr 2026 12:18:29 +0000
Gerrit-HasComments: Yes
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Zoltan Chovan (Code Review)" <ge...@cloudera.org>.
Zoltan Chovan has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 4: Code-Review+1
(1 comment)
Overall it looks good to me, I have a follow-up about a possible edge case, but it might be irrelevant
http://gerrit.cloudera.org:8080/#/c/24191/4/src/kudu/master/auto_rebalancer.cc
File src/kudu/master/auto_rebalancer.cc:
http://gerrit.cloudera.org:8080/#/c/24191/4/src/kudu/master/auto_rebalancer.cc@542
PS4, Line 542: RETURN_NOT_OK(proxy.BulkChangeConfig(req, &resp, &rpc));
: if (resp.has_error()) return StatusFromPB(resp.error().status());
I wonder what would happen if this BulkChangeConfig() times out, so that the dst_ts does recevie the change request, just isn't able to respond in a timely manner. That mean that this move will be dropped at the end of this loop, and would be reported as failed, but I'm not sure what would happen on the dst side, would it be rolled back? I guess this move wouldn't come back up, since the clusterinfo would be rebuilt in RunLoop()
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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, 04 May 2026 11:17:25 +0000
Gerrit-HasComments: Yes
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 4: Verified+1
Build Successful
http://jenkins.kudu.apache.org/job/pre_commit/2530/ : SUCCESS
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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 Apr 2026 16:01:42 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 4:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/2530/
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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 Apr 2026 15:12:20 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/24191/2/src/kudu/master/auto_rebalancer-test.cc
File src/kudu/master/auto_rebalancer-test.cc:
http://gerrit.cloudera.org:8080/#/c/24191/2/src/kudu/master/auto_rebalancer-test.cc@1024
PS2, Line 1024: at least two more iterations ra
> Nit: the comment should say "at least two more iterations" to match the ass
Done
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Tue, 28 Apr 2026 21:51:17 +0000
Gerrit-HasComments: Yes
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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, 06 May 2026 15:22:27 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
[auto_rebalancer] address TODO in ExecuteMoves()
Remove moves that fail to be scheduled from replica_moves
instead of early-returning on the first error. The old code
used RETURN_NOT_OK inside a const-ref loop, leaving unscheduled
moves in the vector and causing CheckReplicaMovesCompleted to
wait on them indefinitely.
ExecuteMoves now takes replica_moves by pointer and handles each
failure per-move: log a warning and erase the move before
returning, so only successfully submitted moves remain.
Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Reviewed-on: http://gerrit.cloudera.org:8080/24191
Tested-by: Kudu Jenkins
Reviewed-by: Zoltan Chovan <zc...@cloudera.com>
Reviewed-by: Marton Greber <gr...@gmail.com>
---
M src/kudu/master/auto_rebalancer-test.cc
M src/kudu/master/auto_rebalancer.cc
M src/kudu/master/auto_rebalancer.h
3 files changed, 124 insertions(+), 84 deletions(-)
Approvals:
Kudu Jenkins: Verified
Zoltan Chovan: Looks good to me, but someone else must approve
Marton Greber: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 5
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 1: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/2470/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Tue, 14 Apr 2026 17:44:52 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 2: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/2482/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Fri, 17 Apr 2026 14:01:46 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Abhishek Chennaka (Code Review)" <ge...@cloudera.org>.
Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Wed, 29 Apr 2026 05:38:13 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 2:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer-test.cc
File src/kudu/master/auto_rebalancer-test.cc:
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer-test.cc@1022
PS1, Line 1022: ated atomically w
> Maybe I'm missing something: why "+2" and not "+1" here?
Done
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer-test.cc@1025
PS1, Line 1025: // 2. GetMoves found moves to attempt this ro
> This assertion passes when all RPCs fail (expected). But
Added moves_attempted_this_round_for_test_ and a corresponding NumMovesAttempted() accessor in the test.
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer.cc
File src/kudu/master/auto_rebalancer.cc:
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer.cc@284
PS1, Line 284: s.ToString());
> WARN_NOT_OK now wraps a function that always returns Status::OK(), so
Done
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer.cc@780
PS1, Line 780: const auto& dst_ts_uuid = move.ts_uuid_to;
:
: if (moves_per_tserver_[src_ts_uuid] > 0) {
: moves_per_tserver_[src_ts_uuid]--;
> Here and below: any particular reason why "if" check was replaced with a de
Done
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Fri, 17 Apr 2026 13:21:10 +0000
Gerrit-HasComments: Yes
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 2:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/2482/
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Fri, 17 Apr 2026 13:21:05 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24191
to look at the new patch set (#3).
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
[auto_rebalancer] address TODO in ExecuteMoves()
Remove moves that fail to be scheduled from replica_moves
instead of early-returning on the first error. The old code
used RETURN_NOT_OK inside a const-ref loop, leaving unscheduled
moves in the vector and causing CheckReplicaMovesCompleted to
wait on them indefinitely.
ExecuteMoves now takes replica_moves by pointer and handles each
failure per-move: log a warning and erase the move before
returning, so only successfully submitted moves remain.
Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
---
M src/kudu/master/auto_rebalancer-test.cc
M src/kudu/master/auto_rebalancer.cc
M src/kudu/master/auto_rebalancer.h
3 files changed, 117 insertions(+), 81 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/24191/3
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 1:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/2470/
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Tue, 14 Apr 2026 16:47:21 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 1:
(4 comments)
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer-test.cc
File src/kudu/master/auto_rebalancer-test.cc:
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer-test.cc@1022
PS1, Line 1022: initial_loops + 2
Maybe I'm missing something: why "+2" and not "+1" here?
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer-test.cc@1025
PS1, Line 1025: ASSERT_EQ(0, NumMovesScheduled(leader_idx))
This assertion passes when all RPCs fail (expected). But
NumMovesScheduled reads the test counter that is set via
moves_scheduled_this_round_for_test_ = replica_moves.size(). If the rebalancer
loop runs a second iteration between the RPCs failing and this assertion
evaluating, and by chance a later iteration finds nothing to move (counter stays
0), the assertion passes vacuously rather than because the failed moves were
removed. Is there a way to assert more directly that moves were attempted and
then removed — e.g. by capturing replica_moves.size() before and after
ExecuteMoves, or by checking that the log line and zero-count appear within the
same iteration?
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer.cc
File src/kudu/master/auto_rebalancer.cc:
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer.cc@284
PS1, Line 284: WARN_NOT_OK(ExecuteMoves(&replica_moves),
WARN_NOT_OK now wraps a function that always returns Status::OK(), so
the warning string "failed to send replica move request" can never fire. Per-move
failures are logged individually inside ExecuteMoves, which is good, but the
WARN_NOT_OK call is now dead code and the message is misleading. Should this be
changed to a void call or removed, and/or should the log string be updated to
reflect that warnings come from inside ExecuteMoves?
http://gerrit.cloudera.org:8080/#/c/24191/1/src/kudu/master/auto_rebalancer.cc@780
PS1, Line 780: DCHECK_GT(moves_per_tserver_[src_ts_uuid], 0);
: moves_per_tserver_[src_ts_uuid]--;
: if (!dst_ts_uuid.empty()) {
: DCHECK_GT(moves_per_tserver_[dst_ts_uuid], 0);
Here and below: any particular reason why "if" check was replaced with a debug only check here?
(DCHCEK is no-op in prod/release builds)
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Wed, 15 Apr 2026 11:07:06 +0000
Gerrit-HasComments: Yes
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 3:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/2523/
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Tue, 28 Apr 2026 21:51:06 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 3: Verified+1
Build Successful
http://jenkins.kudu.apache.org/job/pre_commit/2523/ : SUCCESS
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Comment-Date: Tue, 28 Apr 2026 22:40:48 +0000
Gerrit-HasComments: No
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Zoltan Chovan (Code Review)" <ge...@cloudera.org>.
Zoltan Chovan has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 3:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/24191/3/src/kudu/master/auto_rebalancer-test.cc
File src/kudu/master/auto_rebalancer-test.cc:
http://gerrit.cloudera.org:8080/#/c/24191/3/src/kudu/master/auto_rebalancer-test.cc@1029
PS3, Line 1029: ASSERT_EVENTUALLY([&] {
: ASSERT_LT(initial_loops + 1, NumLoopIterations(leader_idx));
: ASSERT_GT(NumMovesAttempted(leader_idx), 0);
: ASSERT_EQ(0, NumMovesScheduled(leader_idx));
: });
couldn't this assertion pass before ExecuteMoves() is finished? in auto_rebalancer.cc, moves_attempted_this_round_for_test_ is set right before ExecuteMoves(), while moves_scheduled_this_round_for_test_ is still the previous round’s value, what happens if we have an rpc hang during ExecuteMoves()? I think this could lead to a silent false positive assertion.
http://gerrit.cloudera.org:8080/#/c/24191/3/src/kudu/master/auto_rebalancer.h
File src/kudu/master/auto_rebalancer.h:
http://gerrit.cloudera.org:8080/#/c/24191/3/src/kudu/master/auto_rebalancer.h@135
PS3, Line 135: Returns a non-OK status
this method no longer returns a status
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 3
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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 Apr 2026 12:30:13 +0000
Gerrit-HasComments: Yes
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Zoltan Chovan, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24191
to look at the new patch set (#4).
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
[auto_rebalancer] address TODO in ExecuteMoves()
Remove moves that fail to be scheduled from replica_moves
instead of early-returning on the first error. The old code
used RETURN_NOT_OK inside a const-ref loop, leaving unscheduled
moves in the vector and causing CheckReplicaMovesCompleted to
wait on them indefinitely.
ExecuteMoves now takes replica_moves by pointer and handles each
failure per-move: log a warning and erase the move before
returning, so only successfully submitted moves remain.
Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
---
M src/kudu/master/auto_rebalancer-test.cc
M src/kudu/master/auto_rebalancer.cc
M src/kudu/master/auto_rebalancer.h
3 files changed, 124 insertions(+), 84 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/24191/4
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz has posted comments on this change. ( http://gerrit.cloudera.org:8080/24191 )
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
Patch Set 4:
(1 comment)
> Patch Set 4: Code-Review+1
>
> (1 comment)
>
> Overall it looks good to me, I have a follow-up about a possible edge case, but it might be irrelevant
http://gerrit.cloudera.org:8080/#/c/24191/4/src/kudu/master/auto_rebalancer.cc
File src/kudu/master/auto_rebalancer.cc:
http://gerrit.cloudera.org:8080/#/c/24191/4/src/kudu/master/auto_rebalancer.cc@542
PS4, Line 542: RETURN_NOT_OK(proxy.BulkChangeConfig(req, &resp, &rpc));
: if (resp.has_error()) return StatusFromPB(resp.error().status());
> I wonder what would happen if this BulkChangeConfig() times out, so that th
There are two possible cases if this happens. In the first case, where the request never reaches the leader, the move is dropped and rescheduled on the next loop iteration.
In the second case, where the request was committed but the response was lost, the move proceeds at the Raft level without rebalancer tracking. The catalog manager's ProcessTabletReports picks it up, and the src will eventually be evicted via AsyncEvictReplicaTask on the next heartbeat cycle.
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 4
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
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: Tue, 05 May 2026 15:18:23 +0000
Gerrit-HasComments: Yes
[kudu-CR] [auto rebalancer] address TODO in ExecuteMoves()
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24191
to look at the new patch set (#2).
Change subject: [auto_rebalancer] address TODO in ExecuteMoves()
......................................................................
[auto_rebalancer] address TODO in ExecuteMoves()
Remove moves that fail to be scheduled from replica_moves
instead of early-returning on the first error. The old code
used RETURN_NOT_OK inside a const-ref loop, leaving unscheduled
moves in the vector and causing CheckReplicaMovesCompleted to
wait on them indefinitely.
ExecuteMoves now takes replica_moves by pointer and handles each
failure per-move: log a warning and erase the move before
returning, so only successfully submitted moves remain.
Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
---
M src/kudu/master/auto_rebalancer-test.cc
M src/kudu/master/auto_rebalancer.cc
M src/kudu/master/auto_rebalancer.h
3 files changed, 117 insertions(+), 81 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/24191/2
--
To view, visit http://gerrit.cloudera.org:8080/24191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6a356c52f940827075a564ab3d03e082f02a1d61
Gerrit-Change-Number: 24191
Gerrit-PatchSet: 2
Gerrit-Owner: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>