Skip to content

Commit

Permalink
Add warn logs for remote backpressure rejection (#13218)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Bafna <[email protected]>
  • Loading branch information
gbbafna authored Apr 16, 2024
1 parent a2f07ed commit 8bd0ad9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 8bd0ad9

Please sign in to comment.