aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex <lx@deuxfleurs.fr>2025-01-31 13:10:54 +0000
committerAlex <lx@deuxfleurs.fr>2025-01-31 13:10:54 +0000
commit9330fd79d3466051394f6d419a247d46da8f5151 (patch)
tree7ef4bb6a12d0c25824f350fddbee1e8ccf81b0f7
parentab71544499679685877cd7bd683ba4556b4331f2 (diff)
parent83f6928ff700fc88d5cfd3d20ed91ca28c24ffcd (diff)
downloadgarage-9330fd79d3466051394f6d419a247d46da8f5151.tar.gz
garage-9330fd79d3466051394f6d419a247d46da8f5151.zip
Merge pull request 'table::insert_many: avoid failure with zero items (fix #915)' (#946) from fix-915 into mainHEADmain
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/946
-rw-r--r--src/table/table.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/table/table.rs b/src/table/table.rs
index ea8471d0..255947e7 100644
--- a/src/table/table.rs
+++ b/src/table/table.rs
@@ -204,6 +204,10 @@ impl<F: TableSchema, R: TableReplication> Table<F, R> {
entries_vec.push((write_sets, e_enc));
}
+ if entries_vec.is_empty() {
+ return Ok(());
+ }
+
// Compute a deduplicated list of all of the write sets,
// and compute an index from each node to the position of the sets in which
// it takes part, to optimize the detection of a quorum.