From 589e9e974900af29971fcac385079bff5858d6a7 Mon Sep 17 00:00:00 2001 From: Ankit Kala Date: Mon, 12 Sep 2022 10:04:26 +0530 Subject: [PATCH] Addressing PR comment: explicit logic check Signed-off-by: Ankit Kala --- server/src/main/java/org/opensearch/index/shard/IndexShard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java index d2ab97f24d09c..f0ba6c3f5da41 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -2363,7 +2363,7 @@ public Translog.Snapshot getHistoryOperations(String reason, long startingSeqNo, * This method should only be invoked if Segment Replication or Remote Store is not enabled. */ public Translog.Snapshot getHistoryOperationsFromTranslog(long startingSeqNo, long endSeqNo) throws IOException { - assert !(indexSettings.isSegRepEnabled() || indexSettings.isRemoteStoreEnabled()) + assert (indexSettings.isSegRepEnabled() || indexSettings.isRemoteStoreEnabled() == false) : "unsupported operation for segment replication enabled indices or remote store backed indices"; return getEngine().translogManager().newChangesSnapshot(startingSeqNo, endSeqNo, true); }