refactor(core,fuse): a node made here goes by its local id until it lands (schema 41)

A file or folder made on the mount used to get a minted `local~<ms>-<n>`
placeholder. It now gets `local~<lid>`, a function of the row it is given
first (`Db::add_local_row`), so the stand-in never changes and always leads
back to the row, and through it to the real uid once the node lands.
`Db::lid_of` reads it without a lookup.

Migration V41 rewrites the placeholders still stored to their row's
stand-in: the row and its node_json, its children, the ops on it or into
it (uid, parent, sidecar uid, a rename's original parent), and its pins.

Step 6a of the plan for 3.0.0 phase 3.
This commit is contained in:
nvrl committed 2026-10-04 12:32:20 +02:00
1 parent 3f74b95b34
commit e5f3f612f8
8 files changed
+312 -58

No files matched your search

+8 -1
View File
@@ -37,7 +37,14 @@ Tracks `docs/MILESTONE-3.0.0.md`. Update it with every commit that moves a phase
- [ ] Queries over children and subtrees by `parent_lid`, and no rewrite of the children's
`parent_uid` when a folder lands (R3). Both go with the placeholders: until then the
strings are kept in step.
- [ ] No more placeholders: `nodes.uid` is `NULL` until a node lands.
- [ ] No more placeholders: `nodes.uid` is `NULL` until a node lands. In four parts:
- [x] 6a: a node made here goes by `local~<lid>`, a function of its row, instead of a
minted `local~<ms>-<n>`; schema 41 rewrites the old placeholders (nodes, ops, pins).
- [ ] 6b: ops by lid; a landing create rewrites no other op.
- [ ] 6c: a local node's row has `uid NULL`; children and subtrees by `parent_lid`; pins
by lid.
- [ ] 6d: in memory, `pending`, `hidden` and `creating` by lid; `is_local_uid` checks
become `remote_uid().is_none()`.
- [ ] An executor that runs ops in dependency order, many at once.
3. **Speed (§7)**: run independent ops in parallel, batch trashes and moves; measure 1,000 files
and 100 folders on Wi-Fi against LAN (target: within 10 %).