From 05ad808c76cb686e124005b040f0586779a4dc01 Mon Sep 17 00:00:00 2001 From: Marc Handalian Date: Fri, 6 Jan 2023 09:30:28 -0800 Subject: [PATCH] Update warn logs in isSegmentReplicationAllowed. Signed-off-by: Marc Handalian --- .../main/java/org/opensearch/index/shard/IndexShard.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 7abbc6148eeb3..61e78f8739b13 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -1448,18 +1448,18 @@ public boolean isSegmentReplicationAllowed() { return false; } if (getReplicationTracker().isPrimaryMode()) { - logger.warn("Ignoring new replication checkpoint - shard is in primaryMode and cannot receive any checkpoints."); + logger.warn("Shard is in primary mode and cannot perform segment replication as a replica."); return false; } if (this.routingEntry().primary()) { - logger.warn("Ignoring new replication checkpoint - primary shard cannot receive any checkpoints."); + logger.warn("Shard is marked as primary and cannot perform segment replication as a replica"); return false; } if (state().equals(IndexShardState.STARTED) == false && (state() == IndexShardState.POST_RECOVERY && shardRouting.state() == ShardRoutingState.INITIALIZING) == false) { logger.warn( () -> new ParameterizedMessage( - "Ignoring new replication checkpoint - shard is not started or recovering {} {}", + "Shard is not started or recovering {} {} and cannot perform segment replication as a replica", state(), shardRouting.state() ) @@ -1469,7 +1469,7 @@ public boolean isSegmentReplicationAllowed() { if (getReplicationEngine().isEmpty()) { logger.warn( () -> new ParameterizedMessage( - "Ignoring checkpoint, attempting to perform segrep with wrong engine type {}", + "Shard does not have the correct engine type to perform segment replication {}.", getEngine().getClass() ) );