diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-18 19:21:34 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-18 19:21:34 +0200 |
commit | f41583e1b731574b4bb13a20d4b3fd9fe3a899f5 (patch) | |
tree | a2c1d32284fa0dc30fdf5408afad8255d50e51f6 /src/table_sync.rs | |
parent | 3f40ef149f6dd4d61ceb326b5691e186aec178c3 (diff) | |
download | garage-f41583e1b731574b4bb13a20d4b3fd9fe3a899f5.tar.gz garage-f41583e1b731574b4bb13a20d4b3fd9fe3a899f5.zip |
Massive RPC refactoring
Diffstat (limited to 'src/table_sync.rs')
-rw-r--r-- | src/table_sync.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/table_sync.rs b/src/table_sync.rs index 024e239f..3ba2fc6a 100644 --- a/src/table_sync.rs +++ b/src/table_sync.rs @@ -360,12 +360,14 @@ impl<F: TableSchema + 'static> TableSyncer<F> { // If their root checksum has level > than us, use that as a reference let root_cks_resp = self .table - .rpc_call( + .rpc_client + .call( &who, &TableRPC::<F>::SyncRPC(SyncRPC::GetRootChecksumRange( partition.begin.clone(), partition.end.clone(), )), + self.table.param.timeout, ) .await?; if let TableRPC::<F>::SyncRPC(SyncRPC::RootChecksumRange(range)) = root_cks_resp { @@ -392,9 +394,11 @@ impl<F: TableSchema + 'static> TableSyncer<F> { let rpc_resp = self .table - .rpc_call( + .rpc_client + .call( &who, &TableRPC::<F>::SyncRPC(SyncRPC::Checksums(step, retain)), + self.table.param.timeout, ) .await?; if let TableRPC::<F>::SyncRPC(SyncRPC::Difference(mut diff_ranges, diff_items)) = @@ -451,7 +455,12 @@ impl<F: TableSchema + 'static> TableSyncer<F> { } let rpc_resp = self .table - .rpc_call(&who, &TableRPC::<F>::Update(values)) + .rpc_client + .call( + &who, + &TableRPC::<F>::Update(values), + self.table.param.timeout, + ) .await?; if let TableRPC::<F>::Ok = rpc_resp { Ok(()) |