aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-14 15:40:46 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-14 15:40:46 +0100
commit90e1619b1e9f5d81e59da371f04717f0c4fe5afc (patch)
tree914435938c6134bb959baaa4ffbd4f575730e9c0 /src/model
parent3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea (diff)
downloadgarage-90e1619b1e9f5d81e59da371f04717f0c4fe5afc.tar.gz
garage-90e1619b1e9f5d81e59da371f04717f0c4fe5afc.zip
table: take into account multiple write sets in inserts
Diffstat (limited to 'src/model')
-rw-r--r--src/model/k2v/rpc.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/model/k2v/rpc.rs b/src/model/k2v/rpc.rs
index aa3323d5..863a068a 100644
--- a/src/model/k2v/rpc.rs
+++ b/src/model/k2v/rpc.rs
@@ -134,16 +134,14 @@ impl K2VRpcHandler {
.rpc_helper()
.try_call_many(
&self.endpoint,
- &who[..],
+ &who,
K2VRpc::InsertItem(InsertedItem {
partition,
sort_key,
causal_context,
value,
}),
- RequestStrategy::with_priority(PRIO_NORMAL)
- .with_quorum(1)
- .interrupt_after_quorum(true),
+ RequestStrategy::with_priority(PRIO_NORMAL).with_quorum(1),
)
.await?;
@@ -192,9 +190,7 @@ impl K2VRpcHandler {
&self.endpoint,
&nodes[..],
K2VRpc::InsertManyItems(items),
- RequestStrategy::with_priority(PRIO_NORMAL)
- .with_quorum(1)
- .interrupt_after_quorum(true),
+ RequestStrategy::with_priority(PRIO_NORMAL).with_quorum(1),
)
.await?;
Ok::<_, Error>((nodes, resp))
@@ -223,7 +219,7 @@ impl K2VRpcHandler {
},
sort_key,
};
- // TODO figure this out with write sets, does it still work????
+ // TODO figure this out with write sets, is it still appropriate???
let nodes = self
.item_table
.data
@@ -232,7 +228,7 @@ impl K2VRpcHandler {
let rpc = self.system.rpc_helper().try_call_many(
&self.endpoint,
- &nodes[..],
+ &nodes,
K2VRpc::PollItem {
key: poll_key,
causal_context,
@@ -240,6 +236,7 @@ impl K2VRpcHandler {
},
RequestStrategy::with_priority(PRIO_NORMAL)
.with_quorum(self.item_table.data.replication.read_quorum())
+ .send_all_at_once(true)
.without_timeout(),
);
let timeout_duration =