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

   Dug into why Lucene deprecated the check-then-act lock pattern: 
LUCENE-6507/6508 removed it because closing a throwaway probe lock can 
invalidate a different, real lock under some native lock implementations -- the 
API was simplified to just "obtain, or fail".
   
   Replaced the probe with that idea: `initIndex()` now calls 
`solrCoreState.getIndexWriter(this, false)` directly for an existing index -- 
the real, cached writer, not a throwaway one. A lock conflict fails core load 
through that same call, via `LockObtainFailedException` (which 
`SolrIndexWriter.create()` now wraps with the descriptive message this method 
used to construct itself).
   
   Verified against `SolrCoreCheckLockOnStartupTest` (both lock types) plus 6 
other test classes including a distributed one.


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