mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 18:45:06 +08:00
get rids of my broken tricks/assert
This commit is contained in:
parent
301907869d
commit
498b59ac84
@ -116,10 +116,6 @@ impl Leader {
|
|||||||
pub fn starts_batch(&self, batch: Batch) {
|
pub fn starts_batch(&self, batch: Batch) {
|
||||||
let mut batch_id = self.batch_id.write().unwrap();
|
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");
|
info!("Send the batch to process to the followers");
|
||||||
*batch_id += 1;
|
*batch_id += 1;
|
||||||
|
|
||||||
@ -163,8 +159,6 @@ impl Leader {
|
|||||||
info!("Tells all the follower to commit");
|
info!("Tells all the follower to commit");
|
||||||
|
|
||||||
self.broadcast_to_follower.send(LeaderMsg::Commit(*batch_id)).unwrap();
|
self.broadcast_to_follower.send(LeaderMsg::Commit(*batch_id)).unwrap();
|
||||||
|
|
||||||
*batch_id += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn register_new_task(&self, task: Task, update_file: Option<Vec<u8>>) {
|
pub fn register_new_task(&self, task: Task, update_file: Option<Vec<u8>>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user