kgyrtkirk commented on code in PR #17823:
URL: https://github.com/apache/druid/pull/17823#discussion_r2007103810


##########
server/src/main/java/org/apache/druid/query/ResultLevelCachingQueryRunner.java:
##########
@@ -106,6 +106,8 @@ public Sequence<T> run(QueryPlus queryPlus, ResponseContext 
responseContext)
 
       if (useResultCache && newResultSetId != null && 
newResultSetId.equals(existingResultSetId)) {
         log.debug("Return cached result set as there is no change in 
identifiers for query %s ", query.getId());
+        // Call accumulate on the sequence to ensure that all 
Wrapper/Closer/Baggage/etc. get called
+        resultFromClient.accumulate(null, (accumulated, in) -> accumulated);

Review Comment:
   its quite unfortunate that the seq needs to be created to get 
`newResultSetId` as that is passed thru the responseContext.
   
   actually the returned seq is an empty seq in cases when the cache supposed 
to be used.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to