craft: document peer-fetch timeout requirement - #174
Merged
Conversation
There was a problem hiding this comment.
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.
| - 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) |
sbinmalek
force-pushed
the
craft/peer-fetch-timeout-docs
branch
from
August 14, 2026 22:06
4b0daf3 to
cd421c3
Compare
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
force-pushed
the
craft/peer-fetch-timeout-docs
branch
from
August 14, 2026 22:07
cd421c3 to
c44109b
Compare
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.
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.