Relationships
#4955 A v3 write command waits the full sidecar start deadline after the supervisor it launched has already exited
Opened by zack · 11/20/2026· Shipped 11/20/2026
LitestreamReplicator.#findOrStart (src/infrastructure/datastore_v3/litestream/litestream_replicator.ts) launches a supervisor, sets launched, and then polls. If that supervisor exits before Litestream's control socket ever answers (it judged its owner gone on its first tick, lost the supervisor lock, or crashed while starting Litestream), the supervisor lock is free again. Each poll then decides start, but since launched is already true it only sleeps until startWaitMs (15 s by default) runs out, then reports: the Litestream sidecar did not start in time. The command could check whether the pid it launched is still alive while it waits. If that pid is gone, it could fail at once with an error saying the sidecar exited before it started, instead of waiting 15 s and blaming the start deadline. Found while triaging swamp-club#4953, where an integration test hits this path on purpose with a mismatched owner. That issue is fixed in the test, so this is a separate, minor UX improvement.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.