Skip to content

Lower noisy RangedAcknowledger log from WARN to DEBUG#263

Open
trex-amazon wants to merge 1 commit into
awslabs:masterfrom
trex-amazon:fix/176-rangedack-log-noise
Open

Lower noisy RangedAcknowledger log from WARN to DEBUG#263
trex-amazon wants to merge 1 commit into
awslabs:masterfrom
trex-amazon:fix/176-rangedack-log-noise

Conversation

@trex-amazon
Copy link
Copy Markdown
Contributor

Summary

Lowers a noisy log line from WARN to DEBUG in RangedAcknowledger.acknowledge().

When the message being acknowledged isn't found in the unacknowledged list (indexOf == -1) — an expected, benign condition for an already-acknowledged or already-deleted message — the code handles it gracefully by returning, but logs at WARN:

if (indexOfMessage == -1) {
    LOG.warn("SQSMessageID: {} with SQSMessageReceiptHandle: {} does not exist.", ...);
}

At WARN this generates log noise that operators routinely mistake for a real fault.

Change

Single-line change: LOG.warn -> LOG.debug. No behavioral change, no public API change. The -1 case is still handled identically.

Testing

mvn test -Dtest=RangedAcknowledgerTest passes (4/4). No test asserts on the log level.

Issues

Resolves #176

RangedAcknowledger.acknowledge() logs at WARN when a message is not found
in the unacknowledged list (indexOf == -1). This is an expected, benign
condition for already-acknowledged or already-deleted messages, and the
code handles it gracefully by returning. Logging it at WARN floods logs
with noise that operators routinely mistake for a real problem.

Downgrade the message from WARN to DEBUG. No behavioral change; no public
API change. The -1 case is still handled identically.

Resolves awslabs#176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RangedAcknowledger logs "SQSMessageID: xxx with SQSMessageReceiptHandle: xxx does not exist." when acknowledge SQSTextMessage

1 participant