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/09/21 00:10:00 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #9443: Fix the bug of hybrid table request using the same request id

Jackie-Jiang commented on code in PR #9443:
URL: https://github.com/apache/pinot/pull/9443#discussion_r975907619


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -669,14 +678,22 @@ private BrokerResponseNative handleRequest(long requestId, String query,
       //       can always list the running queries and cancel query again until it ends. Just that such race
       //       condition makes cancel API less reliable. This should be rare as it assumes sending queries out to
       //       servers takes time, but will address later if needed.
-      QueryServers queryServers = _queriesById.computeIfAbsent(requestId, k -> new QueryServers(query));
+      _queriesById.put(requestId, new QueryServers(query, offlineRoutingTable, realtimeRoutingTable));
       LOGGER.debug("Keep track of running query: {}", requestId);
-      queryServers.addServers(offlineRoutingTable, realtimeRoutingTable);

Review Comment:
   Yes, and that is the reason why I also moved the `_queriesById.remove(requestId)` into the `handleRequest()` to avoid this scenario



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