Conversation
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
zhijian-pro
marked this pull request as ready for review
June 15, 2026 06:23
Bump slatedb.io/slatedb-go from v0.13.1 to v0.15.0 and adapt to two breaking changes in the binding: - ScanPrefix now takes a subrange argument; pass an unbounded range so the whole prefix is scanned. - resolve_object_store rejects URLs with a path component. Open the store at its root and pass the path to the builder instead, so both slatedb:///local/dir and slatedb://s3://bucket/prefix keep working. The dbpath parameter is now appended to the path from the URL. Also in this release, DbIterator.NextBatch lets a scan cross the FFI boundary once per batch instead of once per row; use it for all scans. Two behaviours the driver depends on were untested, and are now covered: reads inside a transaction observing that transaction's own writes and deletes (scan, exist, get), and shouldRetry classifying a real write-write conflict as retryable so kvMeta restarts the transaction. Warn when durability=memory is selected, since commits within the last flush interval are lost if the process is killed, and document in the Makefile that the shared library must be built from the tag matching go.mod or the binding aborts on a UniFFI checksum mismatch. Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Take an optional run id and give each run its own volumes, so the benchmark can be run several times against the same host and object store and the least contended run can be reported. Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
solracsf
force-pushed
the
feat/meta-slate-db
branch
3 times, most recently
from
July 31, 2026 21:53
bf14eab to
8a2f1a4
Compare
zxh326
marked this pull request as draft
August 27, 2026 02:05
Contributor
|
SlateDB doesn’t seem very stable at the moment, so let’s keep this pending for now. |
Contributor
Author
|
I'll keep this PR up-to-data date in the meanwhile. |
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.
DO NOT MERGE AS-IS, EXPERIMENTAL, TESTING ONLY
SlateDB is an object-storage-backed, single-writer LSM key-value store.
Note
One bucket holds the whole filesystem. Today the standalone engines (SQLite/Badger) die with the node, and durable deployments require running Redis/MySQL/TiKV. With SlateDB, metadata gets the same 11-nines durability as the data blocks, in the same bucket. Node dies → remount anywhere, zero metadata migration, no backup cron.
This adds it as a TKV-based metadata engine behind the opt-in
slatedbbuild tag (same pattern as FoundationDB), using the official Go binding (slatedb.io/slatedb-go, cgo, links libslatedb_uniffi).make juicefs.slatedb, test withmake test.slatedb.The .spike/ scripts are the evaluation harness: FUSE mount smoke tests on
file://and MinIO backends, plus themdtestbenchmark used to compare against Badger and SQLite.Important
Building the shared library — the version must match. The Go binding checks the UniFFI contract version and per-function checksums at startup and aborts on a mismatch, so
libslatedb_uniffi.sohas to come from the tag that matchesslatedb.io/slatedb-goingo.mod(currently v0.15.0):Notes for reviewers
slatedbtag, so a green CI run here says this change is non-disruptive, not that the engine works. The engine is covered bymake test.slatedb(the standardtestMeta/testTKVsuites plus SlateDB-specific tests), run locally against v0.15.0, plus FUSE mount smoke tests on a local directory and on MinIO (format → mount → I/O → unmount → remount → verify). Adding a CI job that builds the Rust library and runsmake test.slatedb, analogous to the existingbuild fdbstep, is the obvious follow-up if there is interest in this engine.scan,exist,get), andshouldRetryclassifying a genuine write-write conflict as retryable sokvMeta.txnrestarts instead of surfacing an error.durability=memorylogs a warning, since commits within the last flush interval are lost if the process is killed. Short-lived commands such asjuicefs formatshould use the default durable URL, as they exit without closing the meta client.DbIterator.NextBatch, so a scan crosses the cgo boundary once per batch instead of once per row.go.sum.mdtest numbers (31 dirs serial, then 2,480 file creates across 8 threads)
Measured with slatedb-go v0.15.0. Best of two runs, Docker on a Windows dev host. The Badger column was measured with the read-only
simpleTxnfrom #7173 applied, so it is not flattered by this branch predating that fix.durability=memorydurability=memoryflush_interval=5msNote
Absolute throughput is very host-dependent and Badger in particular is noisy: across sessions on identical code it has measured anywhere between 28,220 and 82,122 files/s, and 42,288 vs 60,429 within a single pair of runs. Treat the create-throughput column as an order of magnitude, not a precise figure. The durable rows are the stable ones, because they are bound by a fixed flush interval rather than by CPU.
What the numbers say:
everysec.file://and MinIO are statistically identical (49 vs 50 files/s), which confirms the cost is the WAL flush cadence and not object-store PUT latency. Serial throughput is 1/interval (~9–10/s); 8 threads only reach ~5 commits/interval because JuiceFS's per-inode transaction lock serializes same-directory creates, capping the group-commit benefit.flush_intervalis the lever: 5 ms → 821 files/s, a 16× improvement, entirely reasonable against MinIO/S3 Express (on S3 Standard it would just mean every commit waits on the actual PUT).mkdirs against MinIO with durable commits averaged 101 ms/op, matching the 100 ms default flush interval exactly.