Skip to content

progress-aware mount startup#12

Merged
Prasanna721 merged 3 commits into
mainfrom
Prasanna721/progress-aware-mount-startup
May 7, 2026
Merged

progress-aware mount startup#12
Prasanna721 merged 3 commits into
mainfrom
Prasanna721/progress-aware-mount-startup

Conversation

@Prasanna721
Copy link
Copy Markdown
Member

mount used to bail at a fixed 30s if the daemon didn't come ready,
which broke big containers where initial sync legitimately takes
longer. now the parent watches a per-tag startup.json the daemon
updates through each phase (validating key, opening cache, initial
sync, mounting fs, starting ipc, ready) and only times out after
30s of no progress. flag is --startup-timeout, default still 30s.

initial sync still runs before the mount goes ready, but the parent
now shows a smoothed X / Y files loaded line on a tty while it
waits. sync engine grew _with_progress variants for deletion scan
and full pull so the daemon can pump counts up.

also: parent uses child.try_wait() instead of pid-alive polling, so
a daemon that exits early surfaces the actual exit status, and
stale startup.json files get cleaned up on shutdown and on
stale-tag sweeps.

how I tested:

  • 3 new unit tests around StartupWaitState (timeout fires after
    inactivity, progress resets the timer, identical bytes don't
    reset it)

Copy link
Copy Markdown
Contributor

@vorflux vorflux Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two actual bugs found — see inline comments.

Comment thread crates/smfs/src/cmd/mount.rs
Comment thread crates/smfs/src/cmd/mount.rs Outdated
@linear
Copy link
Copy Markdown

linear Bot commented May 7, 2026

@Prasanna721 Prasanna721 merged commit 0585c08 into main May 7, 2026
4 checks passed
@Prasanna721 Prasanna721 deleted the Prasanna721/progress-aware-mount-startup branch May 7, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants