serhiy-bzhezytskyy commented on PR #4784:
URL: https://github.com/apache/solr/pull/4784#issuecomment-5379952063

   Dug into this: the pre-check only fires for an existing index dir, and it 
doesn't gate the real IndexWriter open -- that happens later, elsewhere, when 
indexExists==true. So there's a real gap between this obtain-then-release probe 
and the real open, which is the exact race the original deprecated method's 
javadoc warned about. Modern Lucene doesn't have a fix for it -- IndexWriter's 
own constructor does the identical obtainLock() when it actually opens, with no 
separate non-racy check exposed. The only real fix I see is dropping this 
pre-check entirely and catching LockObtainFailedException at the real open 
instead, which is a behavior change beyond this PR's scope. Might be missing 
something -- is this what you were pointing at, or something else?


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to