You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/10/28 20:28:44 UTC

[GitHub] [pinot] dmyang commented on a diff in pull request #9684: Update rebalance API to return no-op when table is already balanced w/ reassignInstances

dmyang commented on code in PR #9684:
URL: https://github.com/apache/pinot/pull/9684#discussion_r1008445534


##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancerClusterStatelessTest.java:
##########
@@ -266,7 +311,7 @@ public void testRebalance()
     rebalanceConfig = new BaseConfiguration();
     rebalanceConfig.addProperty(RebalanceConfigConstants.REASSIGN_INSTANCES, true);
     rebalanceResult = tableRebalancer.rebalance(tableConfig, rebalanceConfig);
-    assertEquals(rebalanceResult.getStatus(), RebalanceResult.Status.DONE);
+    assertEquals(rebalanceResult.getStatus(), RebalanceResult.Status.NO_OP);

Review Comment:
   I'm not sure if this is desired, but it's now possible for rebalance API to return no-op and the instance partition map to get created and/or deleted when changing from the default instance partition map. https://github.com/apache/pinot/blob/f7c5511ca3cb4478287059285529f516eebc8897/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/TableRebalancer.java#L418 I think the partition map should still be the same though, it's just that the ZK entry will not exist.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org