serhiy-bzhezytskyy opened a new pull request, #4784: URL: https://github.com/apache/solr/pull/4784
https://issues.apache.org/jira/browse/SOLR-18364 `isWriterLocked(Directory)` has been `@Deprecated(since = "7.0")` since Robert Muir's 2016 removal of Lucene's own `IndexWriter.isLocked()`, with its own javadoc noting "use of this method can only lead to race conditions." It's `private` with a single internal call site, in `SolrCore.initIndex()`. Removed the wrapper and inlined its check-then-release body directly at that one call site — same behavior, one less indirection: ```java boolean writerLocked; try { dir.obtainLock(IndexWriter.WRITE_LOCK_NAME).close(); writerLocked = false; } catch (LockObtainFailedException failed) { writerLocked = true; } if (writerLocked) { ... } ``` No changelog entry — internal/private method, nothing externally visible changes. Tests: `SolrCoreCheckLockOnStartupTest` (exercises this exact path) green. AI-assisted (Claude Sonnet 5) -- 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]
