Skip to content

craft: document peer-fetch timeout requirement - #174

Merged
szmyd merged 1 commit into
eBay:dev/v6.xfrom
sbinmalek:craft/peer-fetch-timeout-docs
Aug 14, 2026
Merged

craft: document peer-fetch timeout requirement#174
szmyd merged 1 commit into
eBay:dev/v6.xfrom
sbinmalek:craft/peer-fetch-timeout-docs

Conversation

@sbinmalek

Copy link
Copy Markdown
Contributor

CraftPeerFetcher::fetch_from_peer (SyncRSCommitLSN catch-up) had no deadline, so an unresponsive peer could hang it forever. Notes peer_fetch_timeout_ms (home_blks_config.fbs) in S5's acceptance criteria and the peer-plane transport section.

@sbinmalek
sbinmalek requested review from szmyd and a balanced review from Copilot August 14, 2026 21:59

Copilot 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.

Pull request overview

Documents the timeout requirement for CRAFT peer catch-up operations.

Changes:

  • Adds timeout behavior to S5 acceptance criteria.
  • Documents transport-level timeout enforcement.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/craft/subtasks.md Defines peer-fetch timeout requirements.
docs/craft/rpcs.md Documents peer-plane timeout enforcement.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/craft/subtasks.md
- RAFT entry carries `{rs_commit_lsn, client_token, empty_slots[]}`
- **Leader pre-resolution:** before proposing `N`, the leader resolves every unresolved slot ≤ `N`: fetch it from any holder, or record an `Empty` verdict on quorum-lacks evidence (leader counts itself; non-responders never count); it must not propose past an unresolved slot
- On apply: verify token; mark `empty_slots` Empty, **discarding any local data held there** (reconciliation); if behind, `fetch_data()` the remaining missing slots from peers; then `commit_lsn = rs_commit_lsn`. **Apply never truncates** and replicas **never declare Empty unilaterally**
- Peer catch-up (`CraftPeerFetcher::fetch_from_peer`) is **timeout-bounded**: every call passes `peer_fetch_timeout_ms` (`home_blks_config.fbs`, default 5000ms); a peer that misses the deadline is treated as a hard failure, same as any other fetch failure (best-effort — `commit_lsn` still advances, unresolved LSNs stay missing). The interface only carries the deadline; enforcing it against a real wire call is S9's (the transport's)
Comment thread docs/craft/rpcs.md Outdated
@sbinmalek
sbinmalek force-pushed the craft/peer-fetch-timeout-docs branch from 4b0daf3 to cd421c3 Compare August 14, 2026 22:06
CraftPeerFetcher::fetch_from_peer (SyncRSCommitLSN catch-up) had no deadline, so an
unresponsive peer could hang it forever. Notes peer_fetch_timeout_ms (home_blks_config.fbs)
in S5's acceptance criteria and the peer-plane transport section.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sbinmalek
sbinmalek force-pushed the craft/peer-fetch-timeout-docs branch from cd421c3 to c44109b Compare August 14, 2026 22:07

@szmyd szmyd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@szmyd
szmyd merged commit 9fce458 into eBay:dev/v6.x Aug 14, 2026
19 of 22 checks passed
@sbinmalek
sbinmalek deleted the craft/peer-fetch-timeout-docs branch August 17, 2026 16:14
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