SRE-5945 Add enhanced logging for BatchWrite failures - #19
Merged
Conversation
Improves diagnostics when items fail to be processed during sync by adding: - Retry attempt number to track retry loop progress - Error details from BatchWriteItem API calls - Sample item keys (first 3) that failed to help identify patterns - Changed log level from Debug to Warn for better visibility This will help diagnose the root cause of file descriptor leaks that occur during exponential backoff retry loops, as seen in production where unprocessed items trigger retries that accumulate open file descriptors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ayee-ui
requested review from
aakarshg,
ashmannsyngle,
bobby569,
bshouse,
chris-regnier and
nate-mclean
March 25, 2026 21:07
chris-regnier
approved these changes
Mar 25, 2026
chris-regnier
left a comment
There was a problem hiding this comment.
This looks good to me from a go perspective. My comment extends the implementation, consider it a nit.
ashmannsyngle
approved these changes
Mar 25, 2026
Extract hardcoded limit of 3 items to a constant maxSampleItemsToLog. This makes it easier to adjust the logging verbosity in the future without modifying the logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves diagnostics when items fail to be processed during sync by adding:
This will help diagnose the root cause of file descriptor leaks that occur during exponential backoff retry loops, as seen in production where unprocessed items trigger retries that accumulate open file descriptors.