docs: storage error handling and the storage adapter contract#679
Open
darcyparker wants to merge 1 commit into
Open
docs: storage error handling and the storage adapter contract#679darcyparker wants to merge 1 commit into
darcyparker wants to merge 1 commit into
Conversation
Capture what StorageSource guarantees on a failed write (the process stays up, and the change is retained in memory so a later save or reload re-persists it), and the responsibilities that sit with storage adapters: recoverability, retry and backoff as one option among others, and escalation. Note the reliability strategies available, with network redundancy via peers as the primary lever, and that configuring observability and alerting is the embedding application's job via the pluggable logger (setLoggerFactory, console/pino/winston). No first-class storage-error signal is added.
b6b2f24 to
627b7a0
Compare
Collaborator
|
Cool, thanks! Broadly, I think these docs are good. I'm not sure if this is the right place for them. It might be, but we're not really doing that for other stuff. Other options:
I'll sleep on it. |
Contributor
Author
NP - Use it as a reference. Feel free to close this PR. |
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.
What
Adds a dev-docs page,
packages/automerge-repo/dev-docs/storage-error-handling.md, documenting what happens when storage I/O fails and where the responsibility for reliability lies. This is the follow-up suggested in the review discussion on #676. Doc-only; no code changes.Contents
StorageSourceguarantees: a failed save does not crash the process, and the change is retained in memory so a later save or reload re-persists it. It converts a fatal crash into a recoverable condition and does nothing more.setLoggerFactory, shaped for console/pino/winston); shipping logs (for example via OpenTelemetry) to an alerting layer is a deployment concern owned by the application embedding automerge-repo.LoggerFactoryis the hook for programmatic handling.