forked from halo-dev/halo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the problem of LockObtainFailedException while performing a rolli…
…ng update (halo-dev#6543) #### What type of PR is this? /kind bug /area core /milestone 2.19.0 #### What this PR does / why we need it: This PR refactors LuceneSearchEngine to let IndexWriter and SearcherManager load lazily to prevent LockObtainFailedException from performing a rolling update. #### Which issue(s) this PR fixes: Fixes halo-dev#6541 #### Special notes for your reviewer: 1. Use MySQL or PostgreSQL as database for Halo 2. Start an instance of Halo 3. Try to initialize Halo and search posts 4. Change the `server.port` and start another instance of Halo 5. Check the status of another instance #### Does this PR introduce a user-facing change? ```release-note 修复滚动更新时无法启动新的 Halo 实例的问题 ```
- Loading branch information
Showing
2 changed files
with
129 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 45 additions & 92 deletions
137
application/src/test/java/run/halo/app/search/lucene/LuceneSearchEngineTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters