Skip to content

docs(design): update the P2 leftover section to the shipped/decided reality#9

Merged
houseme merged 2 commits into
mainfrom
docs/design-p2-status
Jul 10, 2026
Merged

docs(design): update the P2 leftover section to the shipped/decided reality#9
houseme merged 2 commits into
mainfrom
docs/design-p2-status

Conversation

@houseme

@houseme houseme commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Why

The docs/DESIGN.md section 对 P2 主体实现的遗留项(本 spike 不覆盖) was written at spike completion (2026-07-07) and predates the #1102/#1144/#1145/#1159 implementation. It now misdescribes the state — most notably it still says ecstore O_DIRECT wiring is "remaining, see #4645's temporary route", when #4649 replaced that with native wiring.

What I verified (each item, against the code)

leftover item doc said actual
eventfd reaping partial; AsyncFd remaining ✅ done; AsyncFd ⛔ closed (Drop can't await → API break)
singleton ring lifecycle leftover ⛔→✅ redefined to per-disk sharding (probe_and_start_sharded)
O_DIRECT read_at_direct done; ecstore wiring remaining (#4645 temp route) ✅ done; ecstore native wiring done (#4649)
three read shapes leftover positioned pread_bytes ✅ wired; streaming reads ⛔ NO-GO (#1144)
per-disk probe cache + errno latch leftover ✅ done (#1101)
registered buffers / write path not covered ⬜ still correctly deferred

Change

Rewrote the section with three explicit outcomes (implemented / closed-by-decision / deferred), updated the "这是什么" framing and the conclusion line (P2 main has since shipped, gray-off), added the post-integration page-cache-reclaim contract (#4662), and pointed the 5-item test matrix at the now-15 acceptance tests.

The ownership model, invariants, and test-matrix core are unchanged — they are the contract every shipped item still obeys. Docs-only.

@houseme houseme force-pushed the docs/design-p2-status branch from b813cee to 269582d Compare July 10, 2026 17:44
…eality

The "对 P2 主体实现的遗留项(本 spike 不覆盖)" section was written at
spike completion (2026-07-07) and predates the #1102/#1144/#1145/#1159
implementation waves, so it now misdescribes the state. Verified each item
against the code and rewrote the section with three explicit outcomes —
implemented, closed-by-decision, or correctly-deferred:

- eventfd reaping: implemented; AsyncFd-without-a-driver-thread closed
  (Drop can't await -> API break).
- ring lifecycle: the singleton was replaced by per-disk sharding
  (probe_and_start_sharded); a singleton conflicts with per-disk isolation.
- O_DIRECT read_at_direct: implemented, AND ecstore now wires it natively
  (rustfs/rustfs#4649) - the section still pointed at #4645's temporary route.
- three read shapes: positioned pread_bytes wired; streaming reads are a
  measured NO-GO (backlog#1144), not open work.
- per-disk probe cache + runtime errno latch: implemented (backlog#1101).
- registered buffers / write path: still correctly deferred.

Also correct the premise reference in "要证明的问题": the drop-in-flight
scenario the crate exists for is realized on production GETs, and its primary
trigger is the reader-setup quorum loop (create_bitrot_readers_until_quorum_
all_shards: FuturesUnordered io_primitives.rs:1362, break :1403,
drop(reader_tasks) :1428), where data shards are read eagerly through
UringBackend::pread_bytes -> driver.read_at().await; a task still parked at
that await drops its ReadHandle in Submitted state and issues ASYNC_CANCEL.
The old text pointed at a drifted line (:1455) and attributed the drop only to
the decode-phase FuturesUnordered.

Note in "这是什么" that P2 main has since shipped gray-off, fix the conclusion
line to match, add the post-integration page-cache-reclaim contract
(rustfs/rustfs#4662), and point the 5-item test matrix at the now-15 tests.

The ownership model, invariants, and design constraints are unchanged.

Co-Authored-By: heihutu <heihutu@gmail.com>
@houseme houseme force-pushed the docs/design-p2-status branch from 269582d to 746e16a Compare July 10, 2026 17:49
@houseme houseme merged commit 58cd874 into main Jul 10, 2026
3 checks passed
@houseme houseme deleted the docs/design-p2-status branch July 10, 2026 17:58
houseme added a commit that referenced this pull request Jul 10, 2026
Supersedes the earlier "restore README" intent. The maintainer decision is
to make 0.1.0 publish-ready but hold the actual crates.io release, so:

- README: keep the crates.io/docs.rs badges (they go live on release), on
  top of #8's corrected formatting (de-indented O_DIRECT doctest, compact
  table) that #9's stale base had reverted. The Status note now says 0.1.0 is
  publish-ready with `publish = false` held until a maintainer cuts the
  release, rather than "not published".
- Cargo.toml: keep `publish = false` but document that it is a hold, not a
  blocker — metadata is complete and every dependency is on crates.io, so the
  flip-and-`cargo publish` is a one-step maintainer action.
- CHANGELOG: reframe the note the same way and record that the `[Unreleased]`
  section will move under `[0.1.0]` unchanged on release.

No code change; no `cargo publish` performed (that stays a maintainer action
with their token). README/CHANGELOG/Cargo.toml only.

Co-Authored-By: heihutu <heihutu@gmail.com>
houseme added a commit that referenced this pull request Jul 10, 2026
Supersedes the earlier "restore README" intent. The maintainer decision is
to make 0.1.0 publish-ready but hold the actual crates.io release, so:

- README: keep the crates.io/docs.rs badges (they go live on release), on
  top of #8's corrected formatting (de-indented O_DIRECT doctest, compact
  table) that #9's stale base had reverted. The Status note now says 0.1.0 is
  publish-ready with `publish = false` held until a maintainer cuts the
  release, rather than "not published".
- Cargo.toml: keep `publish = false` but document that it is a hold, not a
  blocker — metadata is complete and every dependency is on crates.io, so the
  flip-and-`cargo publish` is a one-step maintainer action.
- CHANGELOG: reframe the note the same way and record that the `[Unreleased]`
  section will move under `[0.1.0]` unchanged on release.

No code change; no `cargo publish` performed (that stays a maintainer action
with their token). README/CHANGELOG/Cargo.toml only.

Co-authored-by: heihutu <heihutu@gmail.com>
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