Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bc385cb

Browse files
committed
Fix bug in rebalance causing migration of all nodes from source node
1 parent 6bf6563 commit bc385cb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/shard.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,8 @@ rebalance(Cmd *cmd)
223223
int32 worker;
224224
MovePartState *mps = palloc0(sizeof(MovePartState));
225225

226-
do {
227-
worker = workers[worker_idx];
228-
worker_idx = (worker_idx + 1) % num_workers;
229-
} while (node_has_partition(worker, part.part_name));
226+
worker = workers[worker_idx];
227+
worker_idx = (worker_idx + 1) % num_workers;
230228

231229
init_mp_state(mps, part.part_name, part.owner, worker);
232230
tasks[part_idx] = (CopyPartState *) mps;

0 commit comments

Comments
 (0)