Skip to content

Commit

Permalink
src: stream: pipeline: Terminate PipelineRunner if frozen
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Jun 27, 2023
1 parent a63aebf commit 1824208
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/stream/pipeline/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,15 @@ impl PipelineRunner {
&& current_previous_position == position
{
lost_timestamps += 1;
warn!("Position did not change {lost_timestamps}");
} else {
} else if lost_timestamps > 0 {
// We are back in track, erase lost timestamps
warn!("Position normalized, but didn't changed for {lost_timestamps} timestamps");
lost_timestamps = 0;
}

if lost_timestamps > max_lost_timestamps {
warn!("Pipeline lost too many timestamps (max. was {max_lost_timestamps}).");
lost_timestamps = 0;
break 'inner;
if lost_timestamps == 1 {
warn!("Position did not change for {lost_timestamps}, silently tracking until {max_lost_timestamps}, then the stream will be recreated");
} else if lost_timestamps > max_lost_timestamps {
return Err(anyhow!("Pipeline lost too many timestamps (max. was {max_lost_timestamps})"));
}

Some(position)
Expand Down

0 comments on commit 1824208

Please sign in to comment.