aboutsummaryrefslogtreecommitdiff
path: root/src/garage/server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-02 17:01:04 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-02 17:01:04 +0200
commit6805e184e9d856601305045a0cb0499d2608832a (patch)
treef907c8fe0419f8f4d8defdf6cfeb48f412955d27 /src/garage/server.rs
parent9f0f5b2e372a720a807914747fd48ddc93928e04 (diff)
downloadgarage-6805e184e9d856601305045a0cb0499d2608832a.tar.gz
garage-6805e184e9d856601305045a0cb0499d2608832a.zip
Do not put sled in garage's cargo.toml
Diffstat (limited to 'src/garage/server.rs')
-rw-r--r--src/garage/server.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/garage/server.rs b/src/garage/server.rs
index 69f5d60c..9d148ee7 100644
--- a/src/garage/server.rs
+++ b/src/garage/server.rs
@@ -2,6 +2,8 @@ use std::path::PathBuf;
use tokio::sync::watch;
+use garage_db as db;
+
use garage_util::background::*;
use garage_util::config::*;
use garage_util::error::Error;
@@ -32,13 +34,13 @@ pub async fn run_server(config_file: PathBuf) -> Result<(), Error> {
info!("Opening database...");
let mut db_path = config.metadata_dir.clone();
db_path.push("db");
- let db = sled::Config::default()
+ let db = db::sled_adapter::sled::Config::default()
.path(&db_path)
.cache_capacity(config.sled_cache_capacity)
.flush_every_ms(Some(config.sled_flush_every_ms))
.open()
.expect("Unable to open sled DB");
- let db = garage_db::sled_adapter::SledDb::new(db);
+ let db = db::sled_adapter::SledDb::new(db);
info!("Initializing background runner...");
let watch_cancel = netapp::util::watch_ctrl_c();