Skip to content

Store peer availability as compact bitfields - #200

Closed
linroid wants to merge 1 commit into
torrent-v2-08-piece-schedulerfrom
torrent-v2-08-peer-bitfields
Closed

linroid wants to merge 1 commit into
torrent-v2-08-piece-schedulerfrom
torrent-v2-08-peer-bitfields

Conversation

@linroid

@linroid linroid commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Peer protocol state now retains packed availability bits instead of one Boolean entry per piece. At the one-million-piece ceiling this representation uses a 125,000-byte availability payload per peer. V2 scheduling and direct piece lookup read bits without allocating Boolean snapshots; the legacy swarm scheduler explicitly requests a detached snapshot for its existing interface.

Stacked on #199, under #162. This removes one large per-peer allocation obstacle. Aggregate peer admission, retained legacy scheduler snapshots, process RSS and the complete simultaneous production profiles remain to be validated.

Validation at 4dd5256319d2dabd0efebd68319467c4f7c0aacf:

  • 462 JVM tests and 441 actually executed iOS simulator tests; zero failures, errors or skips.
  • Both pinned v1 conformance scenarios and the native-runtime dependency guard pass.
  • Tests cover byte boundaries, have updates, input/snapshot isolation, malformed spare bits without partial publication, empty torrents and requests for the last index of the million-piece profile.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T18:40:16.734686Z 4dd5256 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  672 files  + 5    672 suites  +5   4m 52s ⏱️ +25s
2 765 tests + 9  2 765 ✅ + 9  0 💤 ±0  0 ❌ ±0 
3 687 runs  +15  3 687 ✅ +15  0 💤 ±0  0 ❌ ±0 

Results for commit 4dd5256. ± Comparison against base commit d94e324.

@linroid

linroid commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #236 (V2 scheduling and download execution) in the consolidated eight-PR stack for #162.

The replacement preserves this PR's code and subsequent fixes; its description links the original head and review discussions. The only additional consolidation fix is the CI-discovered listener cancellation regression, documented on the replacement. All eight replacements have passed their required CI checks.

Closing without merging. This branch and its discussions remain available for reference. Review index: #162 (comment)

@linroid linroid closed this Sep 20, 2026
@linroid
linroid deleted the torrent-v2-08-peer-bitfields branch September 20, 2026 11:13
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.

1 participant