benwtrent commented on PR #13627: URL: https://github.com/apache/lucene/pull/13627#issuecomment-2273681251
OK, I have confirmed that @s1monw 's proposed fix does work: ``` DocumentsWriterPerThread obtainAndLock() { while (closed == false) { final DocumentsWriterPerThread perThread = perThreadPool.getAndLock(); - if (perThread.deleteQueue == documentsWriter.deleteQueue) { + if (perThread.deleteQueue.isAdvanced() == false) { ``` And removing the other `isAdvanced()` check in [DocumentsWriter.java](https://github.com/apache/lucene/pull/13627/files#diff-3fa694d9c65c09b06582aa1d76470b931d43f67af81dd7753de7cf15d3d79ed2) still fixes the race condition. I can switch to that method if we want. I can also remove the assertions I added @jpountz -- 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