feat: wire the durable (L2) store seam — chdb-serverless[durable]#3
Open
ShawnChen-Sirius wants to merge 1 commit into
Open
feat: wire the durable (L2) store seam — chdb-serverless[durable]#3ShawnChen-Sirius wants to merge 1 commit into
ShawnChen-Sirius wants to merge 1 commit into
Conversation
ShawnChen-Sirius
force-pushed
the
feat/durable-store-seam
branch
from
July 21, 2026 07:17
5a128b8 to
f678e52
Compare
Add chdb_serverless/durable.py — the DurableStore the store seam already dispatches to for CHDB_STORE=durable:<url>?id= — and point the durable extra at chdb[durable]. Same open_store() API as L1; reads go to the object, writes are logged to its WAL and flushed immediately. chDB is single-writer per process, so this store is the process's one engine. The DAO primitive ships as chdb.durable (subpackage of the main chdb package). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ShawnChen-Sirius
force-pushed
the
feat/durable-store-seam
branch
from
July 21, 2026 08:56
f678e52 to
ddd9d53
Compare
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
chdb_serverless/durable.py— theDurableStorethat the store seam already dispatches to forCHDB_STORE=durable:<url>?id=(seestore.py) — and points thedurableextra atchdb-durable[s3]. This lands the L2 (durable object) tier of the store seam.How it works
Same
open_store()API as L1.CHDB_STORE=durable:s3://bucket/prefix?id=user-123runs the analyst against achdb.durableobject on object storage you own (S3 / GCS / Azure Blob / any S3-compatible / local). Reads go to the object; writes are auto-detected, logged to its WAL, and flushed immediately (a committed write survives the instance dying). chDB is single-writer per process, so this store is the process's one engine.chdb-durable(the DAO primitive) is not yet on PyPI — it is slated to land in the main chdb package aschdb.durable, at which point the extra becomeschdb[durable]. Until then,pip install chdb-serverless[durable]will not resolve. The base package and the L1 (local:) / L3 (memory:) paths are unaffected. Recommend not cutting a chdb-serverless release advertising[durable]until chdb-durable ships. Landing this now keeps the adapter next to the seam that already references it.Testing
Verified locally and against MinIO: durable state persists across restart (base + WAL replay). In-region cold-open measured on AWS/Azure/GCP (~0.5–0.85s for 1M rows; control-plane-round-trip-bound, not restore-bound).
🤖 Generated with Claude Code
Note
Wire the L2 durable store seam backed by
chdb.durableobjectsDurableStorethat routes SQL to achdb.durableobject.DurableStore.__init__parses a durable target URL, reads config overrides from environment variables (CHDB_DURABLE_ID,CHDB_DURABLE_OWNER,CHDB_DURABLE_DB), and opens the named object._is_write, which strips leading SQL comments before checking the first keyword) callexecutethenflushand return an empty string; reads callquerywith a configurable format (defaultJSONCompact).checkpointandclosemethods, both guarded by the same mutex.durableoptional dependency group.Macroscope summarized ddd9d53.