From fc6c09b5c1c3b2cf672872ef84230c0d7c0185d4 Mon Sep 17 00:00:00 2001 From: st1page <1245835950@qq.com> Date: Thu, 21 Sep 2023 14:47:04 +0800 Subject: [PATCH] fix assert --- src/stream/src/common/log_store/kv_log_store/writer.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stream/src/common/log_store/kv_log_store/writer.rs b/src/stream/src/common/log_store/kv_log_store/writer.rs index 54d7db38b8570..7c72afbbd2fa6 100644 --- a/src/stream/src/common/log_store/kv_log_store/writer.rs +++ b/src/stream/src/common/log_store/kv_log_store/writer.rs @@ -68,7 +68,9 @@ impl LogWriter for KvLogStoreWriter { } async fn write_chunk(&mut self, chunk: StreamChunk) -> LogStoreResult<()> { - assert!(chunk.cardinality() > 0); + if chunk.cardinality() == 0 { + return Ok(()); + } let epoch = self.state_store.epoch(); let start_seq_id = self.seq_id; self.seq_id += chunk.cardinality() as SeqIdType;