Files
spacedrive/docs/core
Jamie Pineandcapy-ai-staging[bot] df027c29c1 Volume index keeps one source registry per library (#3120)
* Volume index keeps one source registry per library

attach_library_with replaced the whole registry, so a daemon with two
libraries listed sources only for the library loaded last, in read_dir
order. The registry is now keyed by library id while drive detection
stays shared; attach adds or replaces one library's registrations, close
and delete detach only that library's, and path lookups resolve across
every attached library.

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

* Review fixes: restore resolves its targets before the close, every_store is per library, tracking refuses cross-library overlap

A replace restore closes the library before quiescing its stores, and
the close now takes the registry away, so the snapshot and partition
targets are resolved first and handed to quiesce_stores. detach keeps
the shared drive partitions (the OS watches over them survive a close);
quiesce replaces them with fresh ones that keep their watch
registrations. every_store takes the asking library so dedupe, last-copy
and library search stay inside it, and sources.track refuses a root
another open library already covers.

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

* Restore rebuilds each source's map from its store; overlap guard skips unlocatable sources

A replace restore drops the drive partitions and their snapshots, so a
change below a source root had nowhere to land until something walked
the source again. The restore now reads each attached source's records
back into its arena from the restored store (the peer replica loader's
conversion, shared) and announces the root, which re-arms the watch,
without a walk re-hashing what the store already knows. The cross-library
overlap check ignores sources whose drive is away (empty root), and
quiesce_targets resolves partitions whether or not the index persists.

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

* Restore rebuilds every source on the quiesced drives, whichever library holds it

A partition is the drive's, so quiescing one library's sources takes the
arena away from another open library's sources on the same drive.
rebuild_quiesced reads every attached source on those partitions back
from its store. The multi-library acceptance test backs up and replace-
restores the first library and checks a change below the second's root
still reaches its store.

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

* Restore rebuilds the quiesced maps whether or not the reopen succeeds

The other libraries on the drive were never part of the restore and must
not lose their maps to its failure.

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai-staging[bot] <305915985+capy-ai-staging[bot]@users.noreply.github.com>
2026-10-07 16:36:20 +00:00
..