averma21 commented on a change in pull request #383:
URL: https://github.com/apache/jackrabbit-oak/pull/383#discussion_r735532339



##########
File path: 
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/DefaultMemoryManager.java
##########
@@ -109,7 +110,8 @@ private void configureMemoryListener() {
         log.info("Setting up a listener to monitor pool '{}' and trigger batch 
save " +
                 "if memory drop below {} GB (max {})", pool.getName(), 
minMemoryBytes/ONE_GB, humanReadableByteCount(maxMemory));
         pool.setCollectionUsageThreshold(minMemoryBytes);
-        checkMemory(usage);
+        // todo - should we check and block in the beginning? This creates 
problem in case of download resume.

Review comment:
       I don't see a purpose of checking the memory during the beginning. There 
is nothing to do in this case. The only thing we could do is not to proceed 
further, but such kind of check could be added even before this stage. 
   
   This one creates a problem during resume, in case memory is low due to 
previous run. It won't have any registered clients who still need to dump data 
(since previous run task objects would be unreachable) and checkMemory waits 
for clients to dump data. So the process blocks.
   




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