From 498b59ac84ca395e09d12572576a0990311e43e9 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 21 Mar 2023 12:25:33 +0100 Subject: [PATCH] get rids of my broken tricks/assert --- cluster/src/leader.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cluster/src/leader.rs b/cluster/src/leader.rs index 78bc15eb3..b91d27688 100644 --- a/cluster/src/leader.rs +++ b/cluster/src/leader.rs @@ -116,10 +116,6 @@ impl Leader { pub fn starts_batch(&self, batch: Batch) { let mut batch_id = self.batch_id.write().unwrap(); - assert!( - *batch_id % 2 == 0, - "Tried to start processing a batch before commiting the previous one" - ); info!("Send the batch to process to the followers"); *batch_id += 1; @@ -163,8 +159,6 @@ impl Leader { info!("Tells all the follower to commit"); self.broadcast_to_follower.send(LeaderMsg::Commit(*batch_id)).unwrap(); - - *batch_id += 1; } pub fn register_new_task(&self, task: Task, update_file: Option>) {