We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fa911f commit 2411a9bCopy full SHA for 2411a9b
server/src/main/java/org/elasticsearch/index/shard/IndexShard.java
@@ -2640,15 +2640,12 @@ boolean shouldRollTranslogGeneration() {
2640
}
2641
2642
public void onSettingsChanged() {
2643
- engineResetLock.readLock().lock();
2644
- try {
2645
- var engine = getCurrentEngine(true);
2646
- if (engine != null) {
2647
- engine.onSettingsChanged();
+ withEngineOrNull(engineOrNull -> {
+ if (engineOrNull != null) {
+ engineOrNull.onSettingsChanged();
2648
2649
- } finally {
2650
- engineResetLock.readLock().unlock();
2651
- }
+ return null;
+ });
2652
2653
2654
/**
0 commit comments