Skip to content

SRE-5945 Add enhanced logging for BatchWrite failures - #19

Merged
ayee-ui merged 3 commits into
mainfrom
sre-5945-enhanced-logging
Mar 25, 2026
Merged

SRE-5945 Add enhanced logging for BatchWrite failures#19
ayee-ui merged 3 commits into
mainfrom
sre-5945-enhanced-logging

Conversation

@ayee-ui

@ayee-ui ayee-ui commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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.

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>

@chris-regnier chris-regnier left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me from a go perspective. My comment extends the implementation, consider it a nit.

Comment thread table.go Outdated
ayee-ui and others added 2 commits March 25, 2026 14:20
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>
@ayee-ui ayee-ui closed this Mar 25, 2026
@ayee-ui ayee-ui reopened this Mar 25, 2026
@ayee-ui
ayee-ui merged commit e7ab22f into main Mar 25, 2026
1 check passed
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.

3 participants