From dd269e2b44c6301702285e392fb4a874e0a48922 Mon Sep 17 00:00:00 2001 From: CUBELinux-2 Date: Thu, 13 Aug 2026 05:58:40 -0400 Subject: [PATCH] docs: record DaemonBackend envelope round-trip fix + gate status in RESUME doc --- RESUME-cubefs-daemon.md | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/RESUME-cubefs-daemon.md b/RESUME-cubefs-daemon.md index 283257f..6f0afc2 100644 --- a/RESUME-cubefs-daemon.md +++ b/RESUME-cubefs-daemon.md @@ -35,17 +35,31 @@ B. Direct `rawput` from a Python client checkpoints to `store.json` (4-byte record appeared after the checkpoint interval). Confirmed daemon is alive, reachable, and durable on the host. -## WHAT IS BROKEN (the open bug) — RESOLVED 2026-08-13 -FUSE write did NOT reach the daemon. Root cause was NOT a connection-caching bug -(the earlier `RefCell` cache was already removed in favour of fresh-per-call -sockets). The real blocker: `cubefs-mount` requires `--features mount` to build, -and at that point it did NOT compile (E0308: `CubeFs` vs -`CubeFs` are different types in the `match &socket`). The build was -silently failing, so the running binary was the IN-MEMORY build and `--socket` -was ignored. Fixed by type-erasing the backend (`Box` + a forwarding impl in cubestore). Now compiles and the FUSE mount reaches -the daemon; durability across a daemon `kill -9` is proven (see -VERIFICATION-cubefs-daemon.md, REVISED). +## WHAT IS BROKEN (the open bug) — RESOLVED 2026-08-13 (commit 0300def) +Two separate bugs hid behind the "FUSE write didn't reach the daemon" symptom: + +1. `--features mount` did not compile (E0308: `CubeFs` vs + `CubeFs` are distinct types in the `match &socket`). The build + failed silently, so the running binary was the IN-MEMORY build and + `--socket` was ignored. FIXED in 8f9e7e0 by type-erasing the backend + (`Box` + a forwarding impl). + +2. Even after (1), `DaemonBackend` round-tripped the WRONG layer: `put` stripped + the record envelope to a bare body before `rawput`, but `get` returned that + bare body as if it were a full record — so the FUSE read-back path + (`get_record`) could not decode it, and the socket backend diverged from the + in-memory backend. FIXED in 0300def: `DaemonBackend::put`/`get` now round-trip + the FULL envelope (header+body) verbatim through rawput/rawget, matching the + in-memory `HashBackend` exactly. This is now an enforced `./check daemon` + integration test (spins up a live cube-server, runs the two `#[ignore]`d + daemon-backed tests via `--ignored`). + +## GATE STATUS (2026-08-13) +- `./check` (fmt+test+clippy -D warnings) GREEN. +- `./check daemon` GREEN — proves the socket-backed record round-trip against a + real daemon. +- `./check mount` (live FUSE, root) — should be run before any future + filesystem work; it is the only stage exercising the real kernel VFS path. ## NEXT STEPS (current) 1. Repeat the single-daemon + single-mount e2e INSIDE the VM to confirm the