From 5f3ccf06a061de8966f116b120f829df16625468 Mon Sep 17 00:00:00 2001 From: abcpro1 Date: Wed, 4 Oct 2023 19:37:50 +0000 Subject: [PATCH] fix: only commit when there is something to commit --- dozer-core/src/forwarder.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dozer-core/src/forwarder.rs b/dozer-core/src/forwarder.rs index 56bbe11a8a..18b86bf4d4 100644 --- a/dozer-core/src/forwarder.rs +++ b/dozer-core/src/forwarder.rs @@ -182,7 +182,8 @@ impl SourceChannelManager { fn should_participate_in_commit(&self) -> bool { self.num_uncommitted_ops >= self.commit_sz - || self + || self.num_uncommitted_ops > 0 + && self .last_commit_instant .elapsed() .unwrap_or(self.max_duration_between_commits) // In case of system time drift, we just commit