Make explicit sync a strict durability boundary - #22
Merged
Conversation
jeregrine
approved these changes
Aug 26, 2026
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.
Summary
:sync,{:sync, metadata}, andsync: truefatal when the backend returns its final write error{:sync_failed, reason}fatal-exit reason and skip termination-time persistencehandle_sync/3, background catch-up, and bounded S3 retriesContext
PR #15 identified that an explicit sync could return its normal reply after persistence failed, leaving the caller unable to distinguish durable state from an in-memory-only mutation. This implements the strict retry-then-fail contract discussed there on top of current
mainand supersedes that intentionally-red PR.Built-in writes already receive
max_retries: 5; the storage adapters classify and retry transient failures. DurableServer does not add a second retry loop, avoiding multiplied retries and unsafe handling of ambiguous writes.Validation
mix format --check-formattedmix test— 394 tests, 0 failures (35 excluded integration/stress tests)Supersedes #15.