Skip to content

Commit

Permalink
Update warn logs in isSegmentReplicationAllowed.
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Handalian <handalm@amazon.com>
  • Loading branch information
mch2 committed Jan 6, 2023
1 parent d22f9ac commit 05ad808
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
Expand All @@ -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()
)
);
Expand Down

0 comments on commit 05ad808

Please sign in to comment.