You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/11/05 19:16:54 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #569: Fix partitions double charged for pending message

dasahcc commented on a change in pull request #569: Fix partitions double charged for pending message
URL: https://github.com/apache/helix/pull/569#discussion_r342748685
 
 

 ##########
 File path: helix-core/src/test/java/org/apache/helix/controller/stages/TestIntermediateStateCalcStage.java
 ##########
 @@ -248,26 +255,28 @@ public void testWithClusterConfigChange() {
 
     IntermediateStateOutput output = event.getAttribute(AttributeName.INTERMEDIATE_STATE.name());
 
-    for (String resource : resourceSet) {
+    for (String resource : resources) {
       // Note Assert.assertEquals won't work. If "actual" is an empty map, it won't compare
       // anything.
-      Assert.assertTrue(output.getPartitionStateMap(resource).getStateMap()
-          .equals(expectedResult.getPartitionStateMap(resource).getStateMap()));
+      Assert.assertEquals(output.getPartitionStateMap(resource).getStateMap(), expectedResult.getPartitionStateMap(resource).getStateMap());
 
 Review comment:
   I am not sure whether you understand the scenario. Once the pending messages added to resource0 and the throttling set to 3. p0 and p1 will be charged for pending and only 1 quota leftover. Then for recovery throttle, p0 will take the quota and p1 will be throttled. So it is unexpected result.
   
   With the fix, the expected result will match the computed result.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org