From 8f26a080cff89ee2ebec3c96fd29770f318251c0 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Tue, 14 Apr 2026 20:09:30 -0400 Subject: [PATCH] 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) --- Cargo.lock | 1 + Cargo.toml | 2 +- lib/crates/fabro-store/src/slate/mod.rs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 088e188fa..b334ed663 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6032,6 +6032,7 @@ dependencies = [ "url", "uuid", "walkdir", + "zstd", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4d4125de7..2f942317b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/lib/crates/fabro-store/src/slate/mod.rs b/lib/crates/fabro-store/src/slate/mod.rs index 699283c5c..b0dfcae64 100644 --- a/lib/crates/fabro-store/src/slate/mod.rs +++ b/lib/crates/fabro-store/src/slate/mod.rs @@ -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()