diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationStatsIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationStatsIT.java index b2161577f7040..89aef6f0be1a6 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationStatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationStatsIT.java @@ -432,4 +432,5 @@ public void testSegmentReplicationNodeAndIndexStats() throws Exception { } } + } diff --git a/server/src/main/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsAction.java index 1a4f073941494..44408c5043fcf 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsAction.java @@ -201,7 +201,7 @@ private SegmentReplicationPerGroupStats updateGroupStats( Set combinedStats = Stream.concat(updatedReplicaStats.stream(), searchReplicaStats.stream()) .collect(Collectors.toSet()); - return new SegmentReplicationPerGroupStats(groupStats.getShardId(), combinedStats, 0); + return new SegmentReplicationPerGroupStats(groupStats.getShardId(), combinedStats, groupStats.getRejectedRequestCount()); } private Set computeSearchReplicaStats(