summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/daemon.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/daemon.py')
-rw-r--r--packages/meshbay-node/src/meshbay_node/daemon.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/daemon.py b/packages/meshbay-node/src/meshbay_node/daemon.py
index 518f221..c9c362a 100644
--- a/packages/meshbay-node/src/meshbay_node/daemon.py
+++ b/packages/meshbay-node/src/meshbay_node/daemon.py
@@ -805,8 +805,15 @@ class NodeDaemon:
continue
log.info("Group %r roots changed: %s", group_cfg.name,
", ".join(f"{r.name}={r.path}" for r in roots))
- await indexer.retarget(roots)
+ # The new set is what the node serves from this moment, and the
+ # scan of an added root is not waited for. Awaiting it here held
+ # `_reload_lock` and the old set for as long as the scan ran —
+ # hours for a large drive — so every file request under the new
+ # root found no root to resolve against, and any op answering with
+ # the live table (a writable/removable toggle) showed the directory
+ # gone from the operator's settings.
ctx["roots"] = roots
+ await indexer.retarget(roots, wait=False)
changed += 1
# ── Hot-load new groups ──────────────────────────────────────────