You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "ankitsultana (via GitHub)" <gi...@apache.org> on 2023/05/23 15:50:28 UTC

[GitHub] [pinot] ankitsultana commented on a diff in pull request #10789: [multistage] Avoid Broker Request Id Collision

ankitsultana commented on code in PR #10789:
URL: https://github.com/apache/pinot/pull/10789#discussion_r1202597617


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -69,13 +71,15 @@
 
 public class MultiStageBrokerRequestHandler extends BaseBrokerRequestHandler {
   private static final Logger LOGGER = LoggerFactory.getLogger(MultiStageBrokerRequestHandler.class);
+  private final Random _random = new Random();

Review Comment:
   Added base-2 masking. We can also do base-10 masking to make debugging even easier. Something like:
   
   ```
   brokerHash * 10^9 + (requestId.incrementAndGet() % 10^9)
   ```
   
   lmk your preference



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