itschrispeck commented on code in PR #16221: URL: https://github.com/apache/pinot/pull/16221#discussion_r2178699504
########## pinot-query-planner/src/main/java/org/apache/pinot/query/context/PhysicalPlannerContext.java: ########## @@ -32,6 +35,7 @@ * Per-query unique context dedicated for the physical planner. */ public class PhysicalPlannerContext { + private static final Random RANDOM = new Random(); Review Comment: could introduce some contention? maybe use ThreadLocalRandom? ########## pinot-query-planner/src/main/java/org/apache/pinot/query/planner/physical/v2/opt/rules/LiteModeWorkerAssignmentRule.java: ########## @@ -61,13 +57,11 @@ public LiteModeWorkerAssignmentRule(PhysicalPlannerContext context) { @Override public PRelNode execute(PRelNode currentNode) { - Set<String> workerSet = new HashSet<>(); List<String> workers; if (_runInBroker) { workers = List.of(String.format("0@%s", _context.getInstanceId())); } else { - accumulateWorkers(currentNode, workerSet); - workers = List.of(sampleWorker(new ArrayList<>(workerSet))); + workers = List.of(String.format("0@%s", _context.getRandomInstanceId())); Review Comment: nit: avoid String.format https://github.com/apache/pinot/issues/14404 -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org