diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-12 19:57:37 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-12 19:57:37 +0100 |
commit | c475471e7a8e7544f2be490898f4249cf27a17e9 (patch) | |
tree | 41253eaaba21b7d38340f2eab0ada17eaae88e8a /src/table/table.rs | |
parent | f4aad8fe6e36fe05e05c88c322b99fc87d896578 (diff) | |
download | garage-c475471e7a8e7544f2be490898f4249cf27a17e9.tar.gz garage-c475471e7a8e7544f2be490898f4249cf27a17e9.zip |
Implement table gc, currently for block_ref and version only
Diffstat (limited to 'src/table/table.rs')
-rw-r--r-- | src/table/table.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/table/table.rs b/src/table/table.rs index dd3394bd..7b0d9a24 100644 --- a/src/table/table.rs +++ b/src/table/table.rs @@ -18,6 +18,7 @@ use crate::data::*; use crate::replication::*; use crate::schema::*; use crate::sync::*; +use crate::gc::*; const TABLE_RPC_TIMEOUT: Duration = Duration::from_secs(10); @@ -44,8 +45,6 @@ pub(crate) enum TableRPC<F: TableSchema> { ReadRange(F::P, Option<F::S>, Option<F::Filter>, usize), Update(Vec<Arc<ByteBuf>>), - - SyncRPC(SyncRPC), } impl<F: TableSchema> RpcMessage for TableRPC<F> {} @@ -76,6 +75,7 @@ where }); let syncer = TableSyncer::launch(data.clone(), aux.clone(), rpc_server); + TableGC::launch(data.clone(), aux.clone(), rpc_server); let table = Arc::new(Self { data, @@ -308,10 +308,6 @@ where self.data.update_many(pairs)?; Ok(TableRPC::Ok) } - TableRPC::SyncRPC(rpc) => { - let response = self.syncer.handle_rpc(rpc).await?; - Ok(TableRPC::SyncRPC(response)) - } _ => Err(Error::BadRPC(format!("Unexpected table RPC"))), } } |