Skip to content

Code review of SubtocPreloader improvements#252

Closed
Claude wants to merge 2 commits intofix/fdb-651from
claude/sub-pr-249
Closed

Code review of SubtocPreloader improvements#252
Claude wants to merge 2 commits intofix/fdb-651from
claude/sub-pr-249

Conversation

@Claude
Copy link
Copy Markdown

@Claude Claude AI commented Mar 17, 2026

Reviewed the SubtocPreloader implementation that adds timeout handling, logging, and resource cleanup for async I/O operations when preloading SubTocs.

Review Findings

Strengths:

  • Proper 1-second timeout with aio_suspend() and retry logic for stalled I/O
  • Debug logging shows which subtoc paths are pending when timeout occurs
  • AioCanceller RAII wrapper ensures cleanup of AIO requests during exceptions
  • Correct error handling for EINTR, EAGAIN, and other errno values

Minor Issues:

  • Line 842: Typo "allready" → "already"
  • Lines 828-831: Timeout logging shows all paths instead of only pending ones (where aiocbPtrs[index] != nullptr)
  • No maximum timeout bound; could loop indefinitely if I/O genuinely stalls

Code Location

Changes in src/fdb5/toc/TocHandler.cc:709-883

Ozaq and others added 2 commits March 17, 2026 15:50
Now suspends for up to 1 sec, then logs stall and retries.

Also addresses missing error handling and cancellation on exception
throwing.
@Claude Claude AI assigned Claude and Ozaq Mar 17, 2026
@Claude Claude AI changed the title [WIP] Improve logging when preloading SubTocs Code review of SubtocPreloader improvements Mar 17, 2026
@Claude Claude AI requested a review from Ozaq March 17, 2026 14:53
@Ozaq Ozaq force-pushed the fix/fdb-651 branch 3 times, most recently from 95fdcd2 to 61ae463 Compare March 17, 2026 15:15
@Ozaq Ozaq closed this Mar 17, 2026
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