Repository navigation
contextdb: add v2 library and shell with typed columns, transactions, and concurrent access - #20
Merged
Merged
Conversation
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.
Adds a new workspace under
v2/, beside the current crates, which this change does not touch. Nothing that builds fromcrates/changes; the rootCargo.tomlandCargo.lockare untouched.What is in it
v2/contextdb: the library. Tables with typed columns, a primary key,NOT NULL,UNIQUE,DEFAULTand indexes;INSERT,UPDATE,DELETEandSELECTover one table; transactions; one process writing a store while any number of other processes read it; a memory limit that holds. A store is one folder. Statements this version does not run yet (joins, vector search, relationships, sync clauses and others) are refused and change nothing.v2/contextdb-cli: thecontextdbshell for a store, read-only by default,--writeto write.v2/redb: the storage library. The first commit is upstream redb 4.1.0, source, tests and examples, unchanged. The second commit holds the changes, listed inv2/redb/README.md: a file its writer holds can be opened for reading at the newest whole commit, pages a reader still needs are not reused, and a page's checksum is checked when it is read..github/workflows/check.yml: format, lint with warnings denied, tests on Linux and macOS, the storage library's own tests, a build on Rust 1.89, and two ceilings (shipped lines at most 150,000, tests at most 1,000). The existing workflow gains twopaths-ignorelines so that a change touching onlyv2/does not start it.Commits
2c9a26956storage: add redb 4.1.0 upstream source with tests and examples. 71 files, upstream unchanged; it is built from the next commit on, which adds it to thev2workspace.bde61bdb7contextdb: add v2 library and shell with typed columns, transactions, and concurrent access. 94 files.Measured at this commit
By
v2/numbers.sh: a release build on a 16-core AMD Ryzen 9 9955HX with 64 GB of memory and an NVMe drive, with nothing else running.COUNT(*)of those rowscargo testVerification
check.ymlas written, onbde61bdb7, plus a cross-compiled lint foraarch64-apple-darwin: all pass. 87 of 87 tests; the storage library's 200 (upstream's 196 and 4 for the changes).bde61bdb7, new check: https://github.com/context-graph-ai/contextdb/actions/runs/42899137172 — green, 4 jobs (lint, tests on Linux, tests on macOS for the first time, Rust 1.89), 7 min (20:50–20:57 UTC).bde61bdb7, existing workflow, which runs here because its file changes: https://github.com/context-graph-ai/contextdb/actions/runs/42899137277 — green, 110 jobs passed, 1 skipped, 73 min (20:50–22:03 UTC).dev17b935c; reviewed by a second model family (SHIP).Known and stated in the README