Skip to content

[ISSUE #10462] Improve error handling in tiered storage#10473

Open
lizhimins wants to merge 1 commit into
apache:developfrom
lizhimins:feature/10462-error-handling
Open

[ISSUE #10462] Improve error handling in tiered storage#10473
lizhimins wants to merge 1 commit into
apache:developfrom
lizhimins:feature/10462-error-handling

Conversation

@lizhimins

Copy link
Copy Markdown
Member

What is the purpose of the change

Part of #10462

Improve error handling to prevent silent data corruption and propagate fatal errors.

Brief changelog

  • TieredMessageStore: unwrap CompletionException, re-throw Error
  • PosixFileSegment: throw RuntimeException on IOException in read0
  • FlatAppendFile: getFileCorrectSize bounded 3-retry instead of infinite loop
  • FlatAppendFile: add GET_TIMESTAMP_ERROR constant, use in getMin/MaxTimestamp
  • FileSegment: readAsync uses local snapshot of commitPosition
  • FileSegmentFactory: include provider name/type/path in RuntimeException
  • FlatMessageFile: commitAsync uses tryAcquire instead of drainPermits
  • IndexStoreService: check fileSegmentList empty before accessing last element
  • IndexStoreService: delete corrupted local files during recover

Verifying this change

  • mvn compile succeeds
  • mvn test -pl tieredstore passes (112 tests, 0 failures)

🤖 Generated with Claude Code

- TieredMessageStore: unwrap CompletionException, re-throw Error
- PosixFileSegment: throw RuntimeException on IOException in read0
- FlatAppendFile: getFileCorrectSize bounded 3-retry instead of infinite loop
- FlatAppendFile: add GET_TIMESTAMP_ERROR constant, use in getMin/MaxTimestamp
- FileSegment: readAsync uses local snapshot of commitPosition
- FileSegmentFactory: include provider name/type/path in RuntimeException
- FlatMessageFile: commitAsync uses tryAcquire instead of drainPermits
- IndexStoreService: check fileSegmentList empty before accessing last element
- IndexStoreService: delete corrupted local files during recover

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@oss-sentinel-ai oss-sentinel-ai 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.

Review: Approved ✅

PR: #10473 — Improve error handling in tiered storage
Type: Bug fix (7 files, +34/-25)

Assessment

Prevents silent data corruption: unwraps CompletionException, re-throws Error, throws RuntimeException on IOException in read0.

Verdict

✅ Critical error handling improvements. Part of #10462.


🤖 Automated review by oss-sentinel-ai

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.

2 participants