Skip to content

Commit

Permalink
Add replication strategy logging.
Browse files Browse the repository at this point in the history
Signed-off-by: Rishikesh1159 <[email protected]>
  • Loading branch information
Rishikesh1159 committed Feb 14, 2024
1 parent ba618e2 commit 6951ea2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1890,9 +1890,11 @@ protected Settings nodeSettings(int nodeOrdinal) {
builder.put(TelemetrySettings.TRACER_ENABLED_SETTING.getKey(), true);
}

// Randomly set a replication strategy for the node.
// Randomly set a replication strategy for the node. Replication Strategy can still be manually overridden by subclass if needed.
if (useRandomReplicationStrategy()) {
builder.put(CLUSTER_REPLICATION_TYPE_SETTING.getKey(), randomBoolean() ? ReplicationType.DOCUMENT : ReplicationType.SEGMENT);
ReplicationType replicationType = randomBoolean() ? ReplicationType.DOCUMENT : ReplicationType.SEGMENT;
logger.info("Randomly using Replication Strategy as {}.", replicationType.toString());
builder.put(CLUSTER_REPLICATION_TYPE_SETTING.getKey(), replicationType);
}
return builder.build();
}
Expand Down

0 comments on commit 6951ea2

Please sign in to comment.