Skip to content

Commit

Permalink
fix: remove overly strict assertion during stream pause/resume (#18131)
Browse files Browse the repository at this point in the history
(cherry picked from commit 190875c)
  • Loading branch information
zwang28 authored and stdrc committed Nov 22, 2024
1 parent 469b20f commit d691872
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/stream/src/executor/stream_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,18 @@ impl<const BIASED: bool, M: Send + 'static> StreamReaderWithPause<BIASED, M> {

/// 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;
}
Expand Down

0 comments on commit d691872

Please sign in to comment.