From dfd8f7a1aa30352f2789b0a43db4ba2a9839a8d4 Mon Sep 17 00:00:00 2001 From: Sachin Kale Date: Thu, 14 Dec 2023 13:35:42 +0530 Subject: [PATCH] Fix spotless errors Signed-off-by: Sachin Kale --- .../java/org/opensearch/index/shard/IndexShard.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 8200f868fa50e..d2d6a8540fc05 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -3442,12 +3442,13 @@ assert getLocalCheckpoint() == primaryContext.getCheckpointStates() + primaryContext + "]"; } else { - assert getLocalCheckpoint() == primaryContext.getCheckpointStates().get(routingEntry().allocationId().getId()).getLocalCheckpoint() - || indexSettings().getTranslogDurability() == Durability.ASYNC : "local checkpoint [" - + getLocalCheckpoint() - + "] does not match checkpoint from primary context [" - + primaryContext - + "]"; + assert getLocalCheckpoint() == primaryContext.getCheckpointStates() + .get(routingEntry().allocationId().getId()) + .getLocalCheckpoint() || indexSettings().getTranslogDurability() == Durability.ASYNC : "local checkpoint [" + + getLocalCheckpoint() + + "] does not match checkpoint from primary context [" + + primaryContext + + "]"; } synchronized (mutex) { replicationTracker.activateWithPrimaryContext(primaryContext); // make changes to primaryMode flag only under mutex