feat(store): enable Zstd compression for SlateDB

Reduces S3 storage cost and read latency for run data by compressing
SST blocks with Zstd. Existing uncompressed data remains readable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-04-14 20:09:30 -04:00
parent d863b54ac0
commit 8f26a080cf
No known key found for this signature in database
3 changed files with 4 additions and 2 deletions

1
Cargo.lock generated
View file

@ -6032,6 +6032,7 @@ dependencies = [
"url",
"uuid",
"walkdir",
"zstd",
]
[[package]]

View file

@ -69,7 +69,7 @@ daytona-api-client = { git = "https://github.com/brynary/daytona-sdk-rust", rev
sentry = { version = "0.35", default-features = false, features = ["backtrace", "contexts", "ureq", "rustls"] }
fork = "0.2"
exec = "0.3"
slatedb = "0.11.2"
slatedb = { version = "0.11.2", features = ["zstd"] }
object_store = { version = "0.12.5", features = ["aws"] }
rust-embed = "8"
percent-encoding = "2"

View file

@ -9,7 +9,7 @@ use fabro_types::RunId;
use object_store::ObjectStore;
pub use run_store::RunDatabase;
use run_store::RunDatabaseInner;
use slatedb::config::Settings;
use slatedb::config::{CompressionCodec, Settings};
use tokio::sync::{Mutex, OnceCell};
use crate::{Error, ListRunsQuery, Result, RunSummary, keys};
@ -58,6 +58,7 @@ impl Database {
slatedb::Db::builder(self.shared_db_prefix(), self.object_store.clone())
.with_settings(Settings {
flush_interval: Some(self.flush_interval),
compression_codec: Some(CompressionCodec::Zstd),
..Settings::default()
})
.build()