-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sets the new engine before closing the previous one in IndexShard.res…
…etEngine (#122255) Current code closes the previous engine instance, creates the new engine and then updates the currentEngineReference: IOUtils.close(currentEngine); var newEngine = createEngine(engineConfig); currentEngineReference.set(newEngine); This leaves more room for callers of getEngineOrNull() to pick a closed instance. Instead we can create the new engine first and atomically update the reference to the new instance.
- Loading branch information
Showing
2 changed files
with
6 additions
and
10 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
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