Repository navigation
Add read-only opening for existing SQLite stores - #58
Merged
Merged
Conversation
Review: Add read-only opening for existing SQLite storesThis is a well-scoped, carefully engineered addition. Overall assessment: solid, ready to merge after considering the minor points below. Strengths
Minor suggestions (non-blocking)
Note on verificationI was not able to execute No correctness bugs or security issues found. |
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.
Readers previously had to use New, which may create a missing database, migrate its schema and change its journal mode. OpenReadOnly opens existing file-backed stores with SQLite-enforced read-only connections, validates their schema, and returns ErrReadOnly for mutations. Reads observe later WAL commits; shared-memory sidecars may still change.
Tests cover reads and mutators, engine-level write denial, missing/corrupt/incompatible databases without repair, literal URI-sensitive filenames, pooled connections and concurrent WAL commits. All standalone minimum-Go builds, vet, race and coverage jobs and the full workspace CI passed on the merged release commit. A separate consumer downloaded all four modules through the normal Go proxy with checksum verification, selected v0.20.0 uniformly, and passed a read/write-denial test.
Included in the unified ebu v0.20.0 release, with v0.20.0 tags for core, SQLite, Durable Streams and OpenTelemetry. Existing APIs remain compatible.