benwtrent opened a new pull request, #13627:
URL: https://github.com/apache/lucene/pull/13627

   There is a tricky race condition with DWPT threads. It is possible that a 
flush starts by advancing the deleteQueue (in charge of creating seqNo). Thus, 
the referenced deleteQueue, there should be a cap on the number of actions 
left. 
   
   However, it is possible after the advance, but before the DWPT are actually 
marked for flush, the DWPT gets freed and taken again to be used.
   
   To replicate this extreme behavior, see: 
https://github.com/apache/lucene/compare/main...benwtrent:lucene:test-replicate-and-debug-13127?expand=1
   
   This commit will prevent DWPT from being added back to the free list if 
their queue has been advanced. This is because the `maxSeqNo` for that queue 
was created accounting only for the current number of active threads. If the 
thread gets passed out again and still references the already advanced queue, 
it is possible that seqNo actually advances past the set `maxSeqNo`. 
   
   
   closes: https://github.com/apache/lucene/issues/13127
   closes: https://github.com/apache/lucene/issues/13571
   


-- 
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: issues-unsubscr...@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to