about summary refs log tree commit diff
path: root/tvix/castore
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-12-11T19·25+0200
committerclbot <clbot@tvl.fyi>2023-12-11T22·46+0000
commit9748543f1c3edd88e8b05f6a772d6e9be18a7be9 (patch)
tree7c6a892c220e612b809bf703ab796a4bfa157bcb /tvix/castore
parent6025be423a3dd97e29f536d39ca99528f58e5fb3 (diff)
chore(tvix): drop sled compression support r/7158
It's been a while since the last sled release, and that one binds to a
pretty old version of zstd, requiring workarounds like cl/10090.

Upstream sled main branch currently has zstd halfway patched out (it's
a no-op, but the feature flag and options are still there), and it's in
that state for a year.

Rather than maintaining our own fork of sled, let's just stop using the
compression feature in sled, dropping the version pin to zstd that way,
removing the need for cl/10090.

This doesn't mean we won't reintroduce per-blob compression - but we
probably just won't let sled take care of the compression, but do it
ourselves - which is necessary for more chunked blob storage anyways.

Even though we do drop the feature flag, we still need to explicitly use
use_compression(false).

Change-Id: I0e4892d29e41c76653272dc1a3625180da6fee12
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10257
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore')
-rw-r--r--tvix/castore/Cargo.toml2
-rw-r--r--tvix/castore/src/blobservice/from_addr.rs2
-rw-r--r--tvix/castore/src/blobservice/sled.rs4
-rw-r--r--tvix/castore/src/directoryservice/sled.rs4
4 files changed, 8 insertions, 4 deletions
diff --git a/tvix/castore/Cargo.toml b/tvix/castore/Cargo.toml
index 573c7daa08..468ef8ec35 100644
--- a/tvix/castore/Cargo.toml
+++ b/tvix/castore/Cargo.toml
@@ -12,7 +12,7 @@ futures = "0.3.28"
 lazy_static = "1.4.0"
 pin-project-lite = "0.2.13"
 prost = "0.12.1"
-sled = { version = "0.34.7", features = ["compression"] }
+sled = { version = "0.34.7" }
 thiserror = "1.0.38"
 tokio-stream = { version = "0.1.14", features = ["fs", "net"] }
 tokio-util = { version = "0.7.9", features = ["io", "io-util"] }
diff --git a/tvix/castore/src/blobservice/from_addr.rs b/tvix/castore/src/blobservice/from_addr.rs
index 2834d25a17..106edce04d 100644
--- a/tvix/castore/src/blobservice/from_addr.rs
+++ b/tvix/castore/src/blobservice/from_addr.rs
@@ -36,7 +36,7 @@ pub async fn from_addr(uri: &str) -> Result<Arc<dyn BlobService>, crate::Error>
             ));
         }
 
-        // TODO: expose compression and other parameters as URL parameters?
+        // TODO: expose other parameters as URL parameters?
 
         if url.path().is_empty() {
             return Ok(Arc::new(
diff --git a/tvix/castore/src/blobservice/sled.rs b/tvix/castore/src/blobservice/sled.rs
index 12391ed72a..a6fdbac499 100644
--- a/tvix/castore/src/blobservice/sled.rs
+++ b/tvix/castore/src/blobservice/sled.rs
@@ -15,7 +15,9 @@ pub struct SledBlobService {
 
 impl SledBlobService {
     pub fn new(p: PathBuf) -> Result<Self, sled::Error> {
-        let config = sled::Config::default().use_compression(true).path(p);
+        let config = sled::Config::default()
+            .use_compression(false) // is a required parameter
+            .path(p);
         let db = config.open()?;
 
         Ok(Self { db })
diff --git a/tvix/castore/src/directoryservice/sled.rs b/tvix/castore/src/directoryservice/sled.rs
index 400d2fed59..50e58e7e76 100644
--- a/tvix/castore/src/directoryservice/sled.rs
+++ b/tvix/castore/src/directoryservice/sled.rs
@@ -18,7 +18,9 @@ pub struct SledDirectoryService {
 
 impl SledDirectoryService {
     pub fn new(p: PathBuf) -> Result<Self, sled::Error> {
-        let config = sled::Config::default().use_compression(true).path(p);
+        let config = sled::Config::default()
+            .use_compression(false) // is a required parameter
+            .path(p);
         let db = config.open()?;
 
         Ok(Self { db })