diff --git a/src/stream/src/executor/stream_reader.rs b/src/stream/src/executor/stream_reader.rs index 92a31979c1c5..30de0804b0ac 100644 --- a/src/stream/src/executor/stream_reader.rs +++ b/src/stream/src/executor/stream_reader.rs @@ -95,14 +95,18 @@ impl StreamReaderWithPause { /// Pause the data stream. pub fn pause_stream(&mut self) { - assert!(!self.paused, "already paused"); + if self.paused { + tracing::warn!("already paused"); + } tracing::info!("data stream paused"); self.paused = true; } - /// Resume the data stream. Panic if the data stream is not paused. + /// Resume the data stream. pub fn resume_stream(&mut self) { - assert!(self.paused, "not paused"); + if !self.paused { + tracing::warn!("not paused"); + } tracing::info!("data stream resumed"); self.paused = false; }