lweitzendorf opened a new pull request, #3204:
URL: https://github.com/apache/jackrabbit-oak/pull/3204

   https://issues.apache.org/jira/browse/OAK-12449
   
   ## Summary
   When the dispatch queue already holds `DISPATCH_QUEUE_MAX_SIZE` tasks, 
`SegmentPreloader`'s dispatch executor drops new tasks in `execute()`. Those 
tasks were already registered in `inProgressPrefetch`, but since they never 
run, `afterExecute()` never removes them. The map grows under sustained preload 
pressure, and the affected segments are never preloaded again because they 
appear to be in progress.
   
   The fix calls `clearInProgressTask(command)` when a task is dropped.
   
   ## Tests
   `SegmentPreloaderTest#droppedDispatchTaskIsNotLeftInProgress` blocks the 
dispatcher, fills the queue to its limit, submits one more task and checks that 
`inProgressPrefetch` is empty. It fails without the fix.
   


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