fabriziofortino commented on code in PR #2828:
URL: https://github.com/apache/jackrabbit-oak/pull/2828#discussion_r3026906530


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java:
##########
@@ -344,7 +344,8 @@ class ElasticQueryScanner {
 
             ongoingRequest = indexNode.getConnection().getAsyncClient()
                     .search(searchRequest, ObjectNode.class)
-                    .whenComplete((this::handleResponse));
+                    .whenCompleteAsync((response, throwable) ->
+                            handleResponse(response, throwable, 
System.currentTimeMillis()));

Review Comment:
   yes, you are right. The timing improvement is not from where we capture the 
timestamp, but from which thread pool runs the callback. I have reverted the 
callback. The only change is now whenComplete → whenCompleteAsync.



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

Reply via email to