chore(tvix): drop sled compression support
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
This commit is contained in:
parent
6025be423a
commit
9748543f1c
9 changed files with 14 additions and 16 deletions
1
tvix/Cargo.lock
generated
1
tvix/Cargo.lock
generated
|
@ -2448,7 +2448,6 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
"zstd",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -7426,11 +7426,6 @@ rec {
|
||||||
name = "parking_lot";
|
name = "parking_lot";
|
||||||
packageId = "parking_lot 0.11.2";
|
packageId = "parking_lot 0.11.2";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "zstd";
|
|
||||||
packageId = "zstd";
|
|
||||||
optional = true;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
devDependencies = [
|
devDependencies = [
|
||||||
{
|
{
|
||||||
|
@ -7450,7 +7445,7 @@ rec {
|
||||||
"testing" = [ "event_log" "lock_free_delays" "compression" "failpoints" "backtrace" ];
|
"testing" = [ "event_log" "lock_free_delays" "compression" "failpoints" "backtrace" ];
|
||||||
"zstd" = [ "dep:zstd" ];
|
"zstd" = [ "dep:zstd" ];
|
||||||
};
|
};
|
||||||
resolvedDefaultFeatures = [ "compression" "default" "no_metrics" "zstd" ];
|
resolvedDefaultFeatures = [ "default" "no_metrics" ];
|
||||||
};
|
};
|
||||||
"smallvec" = rec {
|
"smallvec" = rec {
|
||||||
crateName = "smallvec";
|
crateName = "smallvec";
|
||||||
|
@ -9457,7 +9452,6 @@ rec {
|
||||||
{
|
{
|
||||||
name = "sled";
|
name = "sled";
|
||||||
packageId = "sled";
|
packageId = "sled";
|
||||||
features = [ "compression" ];
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "thiserror";
|
name = "thiserror";
|
||||||
|
@ -9980,7 +9974,6 @@ rec {
|
||||||
{
|
{
|
||||||
name = "sled";
|
name = "sled";
|
||||||
packageId = "sled";
|
packageId = "sled";
|
||||||
features = [ "compression" ];
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "thiserror";
|
name = "thiserror";
|
||||||
|
|
|
@ -12,7 +12,7 @@ futures = "0.3.28"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
pin-project-lite = "0.2.13"
|
pin-project-lite = "0.2.13"
|
||||||
prost = "0.12.1"
|
prost = "0.12.1"
|
||||||
sled = { version = "0.34.7", features = ["compression"] }
|
sled = { version = "0.34.7" }
|
||||||
thiserror = "1.0.38"
|
thiserror = "1.0.38"
|
||||||
tokio-stream = { version = "0.1.14", features = ["fs", "net"] }
|
tokio-stream = { version = "0.1.14", features = ["fs", "net"] }
|
||||||
tokio-util = { version = "0.7.9", features = ["io", "io-util"] }
|
tokio-util = { version = "0.7.9", features = ["io", "io-util"] }
|
||||||
|
|
|
@ -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() {
|
if url.path().is_empty() {
|
||||||
return Ok(Arc::new(
|
return Ok(Arc::new(
|
||||||
|
|
|
@ -15,7 +15,9 @@ pub struct SledBlobService {
|
||||||
|
|
||||||
impl SledBlobService {
|
impl SledBlobService {
|
||||||
pub fn new(p: PathBuf) -> Result<Self, sled::Error> {
|
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()?;
|
let db = config.open()?;
|
||||||
|
|
||||||
Ok(Self { db })
|
Ok(Self { db })
|
||||||
|
|
|
@ -18,7 +18,9 @@ pub struct SledDirectoryService {
|
||||||
|
|
||||||
impl SledDirectoryService {
|
impl SledDirectoryService {
|
||||||
pub fn new(p: PathBuf) -> Result<Self, sled::Error> {
|
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()?;
|
let db = config.open()?;
|
||||||
|
|
||||||
Ok(Self { db })
|
Ok(Self { db })
|
||||||
|
|
|
@ -18,7 +18,7 @@ parking_lot = "0.12.1"
|
||||||
pin-project-lite = "0.2.13"
|
pin-project-lite = "0.2.13"
|
||||||
prost = "0.12.1"
|
prost = "0.12.1"
|
||||||
sha2 = "0.10.6"
|
sha2 = "0.10.6"
|
||||||
sled = { version = "0.34.7", features = ["compression"] }
|
sled = { version = "0.34.7" }
|
||||||
thiserror = "1.0.38"
|
thiserror = "1.0.38"
|
||||||
tokio = { version = "1.32.0", features = ["fs", "macros", "net", "rt", "rt-multi-thread", "signal"] }
|
tokio = { version = "1.32.0", features = ["fs", "macros", "net", "rt", "rt-multi-thread", "signal"] }
|
||||||
tokio-listener = { version = "0.2.2", features = [ "tonic010" ] }
|
tokio-listener = { version = "0.2.2", features = [ "tonic010" ] }
|
||||||
|
|
|
@ -54,7 +54,7 @@ pub async fn from_addr(
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: expose compression and other parameters as URL parameters?
|
// TODO: expose other parameters as URL parameters?
|
||||||
|
|
||||||
if url.path().is_empty() {
|
if url.path().is_empty() {
|
||||||
return Ok(Arc::new(
|
return Ok(Arc::new(
|
||||||
|
|
|
@ -26,7 +26,9 @@ impl SledPathInfoService {
|
||||||
blob_service: Arc<dyn BlobService>,
|
blob_service: Arc<dyn BlobService>,
|
||||||
directory_service: Arc<dyn DirectoryService>,
|
directory_service: Arc<dyn DirectoryService>,
|
||||||
) -> Result<Self, sled::Error> {
|
) -> 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()?;
|
let db = config.open()?;
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
|
|
Loading…
Reference in a new issue