From a3125a9e1cff303632217fd3ab2cda7ff9159aea Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 12:58:31 -0400 Subject: [PATCH] Add warn logs for remote backpressure rejection (#13218) (#13228) (cherry picked from commit 8bd0ad94cbffac82c8fd4fb98ed5715830d78064) Signed-off-by: Gaurav Bafna Signed-off-by: github-actions[bot] Co-authored-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); } } }