Skip to content

Commit

Permalink
fix(sink): avoid sinking empty stream chunk (#17511)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenym1 authored Jul 1, 2024
1 parent 9541d63 commit e3c3c0d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/stream/src/executor/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,15 @@ impl<F: LogStoreFactory> SinkExecutor<F> {
// Force append-only by dropping UPDATE/DELETE messages. We do this when the
// user forces the sink to be append-only while it is actually not based on
// the frontend derivation result.
delete_chunks.push(force_delete_only(c.clone()));
let chunk = force_delete_only(c.clone());
if chunk.cardinality() > 0 {
delete_chunks.push(chunk);
}
}
let chunk = force_append_only(c);
if chunk.cardinality() > 0 {
insert_chunks.push(chunk);
}
insert_chunks.push(force_append_only(c));
}
delete_chunks
.into_iter()
Expand Down

0 comments on commit e3c3c0d

Please sign in to comment.