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/08/22 05:03:31 UTC

[GitHub] [pinot] klsince commented on a diff in pull request #9257: Fix a UT that only shows up on host with more cores

klsince commented on code in PR #9257:
URL: https://github.com/apache/pinot/pull/9257#discussion_r951015588


##########
pinot-core/src/test/java/org/apache/pinot/core/operator/combine/SelectionCombineOperatorTest.java:
##########
@@ -184,7 +185,20 @@ public void testSelectionOnly() {
     assertEquals(combineResult.getNumEntriesScannedPostFilter(), numDocsScanned);
     assertEquals(combineResult.getNumSegmentsProcessed(), NUM_SEGMENTS);
     assertEquals(combineResult.getNumConsumingSegmentsProcessed(), NUM_CONSUMING_SEGMENTS);
-    assertEquals(combineResult.getNumConsumingSegmentsMatched(), 0);
+    // The check below depends on the order of segment processing. When segments# <= 10 (the value of
+    // CombinePlanNode.TARGET_NUM_PLANS_PER_THREAD to be specific), the segments are processed in the order as they
+    // are prepared, which is OFFLINE segments followed by RT segments and this case makes the value here equal to 0.
+    // But when segments# > 10, the segments are processed in a different order and some RT segments can be processed
+    // ahead of the other OFFLINE segments. In specific, half of the RT segments can be processed.
+    if (NUM_SEGMENTS <= 10) {
+      assertEquals(combineResult.getNumConsumingSegmentsMatched(), 0, String
+          .format("NumConsumingSegmentsMatched: %d, NumSegments: %d", combineResult.getNumConsumingSegmentsMatched(),
+              NUM_SEGMENTS));
+    } else {
+      assertEquals(combineResult.getNumConsumingSegmentsMatched(), NUM_CONSUMING_SEGMENTS / 2, String

Review Comment:
   👌 



-- 
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