nfsantos commented on code in PR #2410:
URL: https://github.com/apache/jackrabbit-oak/pull/2410#discussion_r2245471776


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java:
##########
@@ -241,6 +288,7 @@ class ElasticQueryScanner {
 
         // Semaphore to guarantee only one in-flight request to Elastic
         private final Semaphore semaphore = new Semaphore(1);
+        private CompletableFuture<SearchResponse<ObjectNode>> ongoingRequest;

Review Comment:
   It's also not clear to me. It may be ok as non-volatile as the class uses 
other synchronization mechanisms (semaphore and AtomicBoolean) before accessing 
this field which may trigger a memory barrier. But as it would take me too long 
to figure out, I'll just go with your suggestion of making it volatile. It is 
not performance critical, so no harm in being cautious here.



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to