aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-03-27 10:44:03 +0100
committerAlex Auvolat <alex@adnab.me>2024-03-27 10:44:03 +0100
commitc0eeb0b0f32ed0a27cfdf9297d0e71e1b9948b73 (patch)
tree5b2c7c31ce02f78727f0ea9a90ec89b274f21c01 /src/model
parent51d11b4b269dbe0dd207a307ddac3811a4cd5079 (diff)
downloadgarage-c0eeb0b0f32ed0a27cfdf9297d0e71e1b9948b73.tar.gz
garage-c0eeb0b0f32ed0a27cfdf9297d0e71e1b9948b73.zip
[next-0.10] fixes to k2v rpc + comment fixes
Diffstat (limited to 'src/model')
-rw-r--r--src/model/k2v/rpc.rs13
-rw-r--r--src/model/s3/object_table.rs2
2 files changed, 5 insertions, 10 deletions
diff --git a/src/model/k2v/rpc.rs b/src/model/k2v/rpc.rs
index e15f2df8..95ff2d18 100644
--- a/src/model/k2v/rpc.rs
+++ b/src/model/k2v/rpc.rs
@@ -219,12 +219,11 @@ impl K2VRpcHandler {
},
sort_key,
};
- // TODO figure this out with write sets, is it still appropriate???
let nodes = self
.item_table
.data
.replication
- .read_nodes(&poll_key.partition.hash());
+ .storage_nodes(&poll_key.partition.hash());
let rpc = self.system.rpc_helper().try_call_many(
&self.endpoint,
@@ -239,8 +238,7 @@ impl K2VRpcHandler {
.send_all_at_once(true)
.without_timeout(),
);
- let timeout_duration =
- Duration::from_millis(timeout_msec) + self.system.rpc_helper().rpc_timeout();
+ let timeout_duration = Duration::from_millis(timeout_msec);
let resps = select! {
r = rpc => r?,
_ = tokio::time::sleep(timeout_duration) => return Ok(None),
@@ -282,12 +280,11 @@ impl K2VRpcHandler {
seen.restrict(&range);
// Prepare PollRange RPC to send to the storage nodes responsible for the parititon
- // TODO figure this out with write sets, does it still work????
let nodes = self
.item_table
.data
.replication
- .read_nodes(&range.partition.hash());
+ .storage_nodes(&range.partition.hash());
let quorum = self.item_table.data.replication.read_quorum();
let msg = K2VRpc::PollRange {
range,
@@ -320,9 +317,7 @@ impl K2VRpcHandler {
// kind: all items produced by that node until time ts have been returned, so we can
// bump the entry in the global vector clock and possibly remove some item-specific
// vector clocks)
- let mut deadline = Instant::now()
- + Duration::from_millis(timeout_msec)
- + self.system.rpc_helper().rpc_timeout();
+ let mut deadline = Instant::now() + Duration::from_millis(timeout_msec);
let mut resps = vec![];
let mut errors = vec![];
loop {
diff --git a/src/model/s3/object_table.rs b/src/model/s3/object_table.rs
index b2f25803..5c721148 100644
--- a/src/model/s3/object_table.rs
+++ b/src/model/s3/object_table.rs
@@ -363,7 +363,7 @@ mod v010 {
}
}
- // Since ObjectVersionHeaders can now be serialized independently, for the
+ // Since ObjectVersionMetaInner can now be serialized independently, for the
// purpose of being encrypted, we need it to support migrations on its own
// as well.
impl garage_util::migrate::InitialFormat for ObjectVersionMetaInner {