Skip to content

Commit 5576526

Browse files
committed
For now do not guard against already failed engine
1 parent 2a93889 commit 5576526

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

core/src/main/java/org/elasticsearch/index/shard/IndexShard.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -759,13 +759,7 @@ public void releaseSnapshot(IndexCommit snapshot) throws IOException {
759759
*/
760760
public void failShard(String reason, @Nullable Throwable e) {
761761
// fail the engine. This will cause this shard to also be removed from the node's index service.
762-
final Engine engine = getEngineOrNull();
763-
if (engine == null) {
764-
logger.trace("ignoring request to fail the shard, we're already closed. (reason: [{}])", e, reason);
765-
766-
} else {
767-
engine.failEngine(reason, e);
768-
}
762+
getEngine().failEngine(reason, e);
769763
}
770764

771765
public Engine.Searcher acquireSearcher(String source) {

0 commit comments

Comments
 (0)