From d645e2088c3464320cb3b2d031a4a6ea07c58632 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Apr 2024 13:18:10 +0000 Subject: [PATCH] Add warn logs for remote backpressure rejection (#13218) Signed-off-by: Gaurav Bafna (cherry picked from commit 8bd0ad94cbffac82c8fd4fb98ed5715830d78064) Signed-off-by: github-actions[bot] --- .../opensearch/index/remote/RemoteStorePressureService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureService.java b/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureService.java index 33cd40f802d43..52f83096dc08d 100644 --- a/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureService.java +++ b/server/src/main/java/org/opensearch/index/remote/RemoteStorePressureService.java @@ -78,7 +78,9 @@ public void validateSegmentsUploadLag(ShardId shardId) { for (LagValidator lagValidator : lagValidators) { if (lagValidator.validate(remoteSegmentTransferTracker, shardId) == false) { remoteSegmentTransferTracker.incrementRejectionCount(lagValidator.name()); - throw new OpenSearchRejectedExecutionException(lagValidator.rejectionMessage(remoteSegmentTransferTracker, shardId)); + String rejectionMessage = lagValidator.rejectionMessage(remoteSegmentTransferTracker, shardId); + logger.warn("Rejecting write requests for shard due to remote backpressure: {}", rejectionMessage); + throw new OpenSearchRejectedExecutionException(rejectionMessage); } } }