fix(fuse): a file read just as its create lands has its bytes (B179)

This commit is contained in:
nvrl committed 2026-10-04 22:52:00 +02:00
1 parent a6f019ebe6
commit 4e0fd3c0b1
6 files changed
+81 -6

No files matched your search

+23
View File
@@ -12,6 +12,29 @@ Conventions:
---
## B179 — A file read just as its create lands reads empty
**Status:** Fixed (unverified).
**Found:** 2026-10-04, by the account run on 378667f, on on-demand sync folders: the unusual
names case read `<angle>|pipe` back as 0 bytes instead of 12, and B70's completed download as 0
bytes instead of 147456. Both files had a write that landed during their create, which the
daemon queued as a revision.
**Where:** `Core::read_range` in `crates/pdfs-fuse/src/reads.rs`.
**Cause.** A read takes the file's uid from the tree and reads on a transfer worker. A file made
on the mount has its stand-in uid there until its create lands. When it lands, the queued write
moves to the uid Drive gave the file. A read that still asked by the stand-in found no write
queued under it, took the file for one created and never written, and returned nothing. The
read waits on the transfer lane, which a run keeps busy, so the window is not small.
**Fix.** A stand-in with no queued write is looked up by its local id. Once its create has
landed, the read goes on under the uid Drive gave it.
**Test:** `a_file_read_as_its_create_lands_has_its_bytes` in `crates/pdfs-fuse/src/sim/daemon.rs`.
---
## B178 — Trashing a folder while sync is paused keeps a create in it as a trash
**Status:** Fixed (unverified).
+1
View File
@@ -83,6 +83,7 @@ by its local id, in the queue, the stored tree and pins alike.
(B177).
- **Deleting a folder while sync is paused no longer leaves a queued change behind** for a
file in it that was never uploaded (B178).
- **A file read just as it reaches Drive no longer reads empty** (B179).
- **A file renamed just as its upload finished keeps its new name.** The mount no longer showed
the old name, and a second rename no longer failed with "No such file or directory" (B152,
B172).
+2 -2
View File
@@ -9,7 +9,7 @@ Tracks `docs/MILESTONE-3.0.0.md`. Update it with every commit that moves a phase
- **Phase 2**: local ids, inode = local id, one tree for every mount (2.10.0).
- **Phase 3, first part**: mkdir, create, rename, unlink and rmdir on the mount are recorded
locally and sent from the queue; `"local_first": false` brings back the old path (5e0f30c).
- Fixes from the simulation and account runs since then: B127 and B141 to B178.
- Fixes from the simulation and account runs since then: B127 and B141 to B179.
- **Sync issues, first cut** (§6.2): refusals sorted into issues, shown at once in the app,
tray and CLI; Export button and `pdfs sync export`; `pdfs sync issues`.
@@ -124,7 +124,7 @@ Tracks `docs/MILESTONE-3.0.0.md`. Update it with every commit that moves a phase
The account run on 378667f: a folder listed as its create landed asked Drive by
its stand-in and answered `EIO` (B177, fixed). A folder trashed while sync was
paused kept a create below it as a trash: a paused drain worker had claimed it
(B178, fixed).
(B178, fixed). A file read as its create landed read empty (B179, fixed).
5. **Release**: 2.10.0 is tagged; the 2.9.0 tag still waits for the user's go-ahead.
## After 3.0.0