From fd00a47ddc4acfe62428064847176a5938ed64a9 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 5 Sep 2023 15:07:29 +0200 Subject: table queue: increase batch size --- src/table/queue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/table/queue.rs') diff --git a/src/table/queue.rs b/src/table/queue.rs index 0857209b..096ac8b4 100644 --- a/src/table/queue.rs +++ b/src/table/queue.rs @@ -12,7 +12,7 @@ use crate::replication::*; use crate::schema::*; use crate::table::*; -const BATCH_SIZE: usize = 100; +const BATCH_SIZE: usize = 1024; pub(crate) struct InsertQueueWorker(pub(crate) Arc>) where -- cgit v1.2.3 From f97168f80567f43e15cf236092703e6ae5d8dc2e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 21 Sep 2023 15:32:25 +0200 Subject: garage_db: refactor transactions and add on_commit mechanism --- src/table/queue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/table/queue.rs') diff --git a/src/table/queue.rs b/src/table/queue.rs index 096ac8b4..ffe0a4a7 100644 --- a/src/table/queue.rs +++ b/src/table/queue.rs @@ -53,7 +53,7 @@ impl Worker for InsertQueueWorker { self.0.insert_many(values).await?; - self.0.data.insert_queue.db().transaction(|mut tx| { + self.0.data.insert_queue.db().transaction(|tx| { for (k, v) in kv_pairs.iter() { if let Some(v2) = tx.get(&self.0.data.insert_queue, k)? { if &v2 == v { -- cgit v1.2.3