Add store-slatedb: a SlateDB tuple-store module - #8
Merged
Conversation
The first non-default `dbval.store` backend, ported from slateval's storage layer. It lives in its own module (own deps.edn depending on dbval via :local/root, consumable as a git dep with :deps/root) because io.slatedb/slatedb-uniffi is a heavy native dependency and the namespace cannot load without it — consumers on the SQLite or memory backend should not download it. The adapter is thin thanks to the pending-overlay design: SlateDB's WriteBatch is write-only (no read-your-writes), which is exactly why the engine owns transaction-read visibility — the store just scans committed keys (native ascending/descending iteration) and commits batches atomically. Module tests run the same representative engine flows as dbval.test.store against the SlateDB store over the in-memory object store; CI runs them alongside the main suite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
slatedb-uniffi is compiled to class-file version 66 (JDK 22+), so the module cannot run on the job's Java 11 — the JVM did not even start, since --enable-native-access does not exist there. The main suite keeps Java 11; the module step switches to Temurin 24 and the JDK requirement is documented in the module README. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
The first non-default
dbval.storebackend — SlateDB, an embedded ordered key-value store on object storage (S3/GCS/local fs) — ported from slateval's storage layer into a submodule:Why a module (unlike the SQLite adapter)
dbval.store.slatedb:importsio.slatedb.unifficlasses, so the namespace cannot load without the jar — norequiring-resolvetrick available — andslatedb-uniffiis a heavy native dependency. Consumers use it as a git dep with:deps/root "store-slatedb"; SQLite/memory users never download it.Why the adapter is thin
SlateDB's
WriteBatchis write-only — no read-your-writes — which is exactly the case the engine's pending-overlay design (from #7) was built for. The adapter only provides:-scan:scanWithOptionsover aKeyRange, with SlateDB's native descending iteration for reverse scans-commit!: stage keys (empty values) into aWriteBatch, one atomic.writeNotably, slateval independently evolved its own pending-writes overlay merged into
slicewhen it ported to SlateDB — the engine-owned overlay in #7 is that same solution, generalized so every backend gets it for free.Tests
cd store-slatedb && clojure -M:test) runs the same representative flows asdbval.test.store— transact, upsert, retract history (forward + reverse scans), query, pull, index-range, snapshot isolation, failed-transaction atomicity — against SlateDB over thememory:///object store: 2 tests, 11 assertions, 0 failures.🤖 Generated with Claude Code
https://claude.ai/code/session_014dX8tTR4yFh5SyBGw3atpo