Repository navigation
watch_applied_owned: hand the store back so a watch can resume in-process (v0.8.5) - #32
Merged
Merged
Conversation
…cess watch_applied closes its store on every exit, so a caller whose readers hold the store (a fold's FjallReader keeps its database alive) cannot re-open the path and has to restart the process on any watch error. A NATS heartbeat miss made instd do exactly that, three times in one day. watch_applied_owned is the same loop without the close. Its WatchEnd carries the result, the applied cursor committed with the store's data, and the store itself, intact on every exit, so the caller resumes by calling again with the same store and resume = applied. watch_applied is now watch_applied_owned followed by the off-runtime close. Release 0.8.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XoaQgogNq1z3dNoM9feGoH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
watch_appliedcloses its store on every exit, so a caller whose readers hold the store (instd's assignment fold keeps a FjallReader on it) can't re-open the path and has to restart the whole process on any watch error. A NATS heartbeat miss made instd do exactly that twice on 2026-10-20 (06:16 and 10:59 UTC).watch_applied_owned: the same loop without the close. ItsWatchEndcarries the result, the applied cursor committed with the store's data, and the store itself, intact on every exit. The caller resumes by calling again with the same store andresume = applied.Nonemeans the store was lost (a flush task panicked).watch_appliedis nowwatch_applied_ownedfollowed by the off-runtime close, so existing callers are unchanged.owned_watch_hands_the_store_back_and_resumes_in_process. A watch that dies on "missed idle heartbeat" returns its store intact; a second run folds the put and delete from the gap.-D warnings.🤖 Generated with Claude Code
https://claude.ai/code/session_01XoaQgogNq1z3dNoM9feGoH