Make syncer have its own rpc client/server

This commit is contained in:
Alex Auvolat
2021-03-12 15:05:26 +01:00
parent 1fea257291
commit 8860aa19b8
3 changed files with 73 additions and 30 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ const TABLE_RPC_TIMEOUT: Duration = Duration::from_secs(10);
pub struct TableAux<F: TableSchema, R: TableReplication> {
pub system: Arc<System>,
pub replication: R,
pub(crate) rpc_client: Arc<RpcClient<TableRPC<F>>>,
rpc_client: Arc<RpcClient<TableRPC<F>>>,
}
pub struct Table<F: TableSchema, R: TableReplication> {
@@ -76,7 +76,7 @@ where
rpc_client,
});
let syncer = TableSyncer::launch(data.clone(), aux.clone());
let syncer = TableSyncer::launch(data.clone(), aux.clone(), rpc_server);
let table = Arc::new(Self { data, aux, syncer });