From 56083ba1ff499f598859fe0e6b53600f18b4b7a9 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Mon, 5 Aug 2019 09:05:29 -0400 Subject: [PATCH] Remove assertion after locally recover replica (#45181) If the disk becomes broken after we have locally recovered shard up to the global checkpoint, then the assertion won't hold. --- .../main/java/org/elasticsearch/index/shard/IndexShard.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java b/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java index b62ca24fe9d..dafd379b192 100644 --- a/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/elasticsearch/index/shard/IndexShard.java @@ -1434,10 +1434,6 @@ public class IndexShard extends AbstractIndexShardComponent implements IndicesCl assert newSafeCommit.isPresent() : "no safe commit found after local recovery"; return newSafeCommit.get().localCheckpoint + 1; } catch (Exception e) { - if (Assertions.ENABLED) { - throw new AssertionError( - "failed to find the safe commit after recovering shard locally up to global checkpoint " + globalCheckpoint, e); - } logger.debug(new ParameterizedMessage( "failed to find the safe commit after recovering shard locally up to global checkpoint {}", globalCheckpoint), e); return UNASSIGNED_SEQ_NO;