aboutsummaryrefslogtreecommitdiff
path: root/src/table/data.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-03-12 10:45:57 +0000
committerAlex <alex@adnab.me>2024-03-12 10:45:57 +0000
commit81191d2d92e58ff82ace0f4d82b275c157673ade (patch)
tree53396e8ddbb94c4cc2f7f037a66c12a3c125c22f /src/table/data.rs
parent2128b5febd97eb6c95e3bdd380dcba39b860c0e3 (diff)
parent2795b53b8b3ebd162df6b0244b73889e72f67ce0 (diff)
downloadgarage-81191d2d92e58ff82ace0f4d82b275c157673ade.tar.gz
garage-81191d2d92e58ff82ace0f4d82b275c157673ade.zip
Merge pull request 'Remove Sled' (#767) from rm-sled into next-0.10
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/767
Diffstat (limited to 'src/table/data.rs')
-rw-r--r--src/table/data.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/table/data.rs b/src/table/data.rs
index 7f6b7847..09f4e008 100644
--- a/src/table/data.rs
+++ b/src/table/data.rs
@@ -6,7 +6,6 @@ use serde_bytes::ByteBuf;
use tokio::sync::Notify;
use garage_db as db;
-use garage_db::counted_tree_hack::CountedTree;
use garage_util::data::*;
use garage_util::error::*;
@@ -36,7 +35,7 @@ pub struct TableData<F: TableSchema, R: TableReplication> {
pub(crate) insert_queue: db::Tree,
pub(crate) insert_queue_notify: Arc<Notify>,
- pub(crate) gc_todo: CountedTree,
+ pub(crate) gc_todo: db::Tree,
pub(crate) metrics: TableMetrics,
}
@@ -61,7 +60,6 @@ impl<F: TableSchema, R: TableReplication> TableData<F, R> {
let gc_todo = db
.open_tree(format!("{}:gc_todo_v2", F::TABLE_NAME))
.expect("Unable to open GC DB tree");
- let gc_todo = CountedTree::new(gc_todo).expect("Cannot count gc_todo_v2");
let metrics = TableMetrics::new(
F::TABLE_NAME,
@@ -370,6 +368,6 @@ impl<F: TableSchema, R: TableReplication> TableData<F, R> {
}
pub fn gc_todo_len(&self) -> Result<usize, Error> {
- Ok(self.gc_todo.len())
+ Ok(self.gc_todo.len()?)
}
}