s1monw commented on PR #13627: URL: https://github.com/apache/lucene/pull/13627#issuecomment-2272816300
it might be that my memory is blurry but let me suggest a different way of doing this. When we mark for a full flush in DWPTFlushControl we do lock the DWPTThreadPool for new writers. Once we have done that we can go ahead and set a boolean (let's call it `stale`) on each of the existing DWPT that it's stale and should be flushed. Then instead of checking `if (perThread.deleteQueue == documentsWriter.deleteQueue) {` in ` DocumentsWriterPerThreadFlushControl obtainAndLock()` we can check for that `stale` and just free that DWPT such that it's not used again. It would then be the same single volatile read? maybe I miss something -- 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