Skip to content

Commit

Permalink
fix: not considered as back pressured when onFull is discardLatest (#…
Browse files Browse the repository at this point in the history
…1153)

Signed-off-by: Derek Wang <[email protected]>
  • Loading branch information
whynowy authored Oct 4, 2023
1 parent b271910 commit 00e6b6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/reconciler/vertex/scaling/scaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ func (s *Scaler) hasBackPressure(pl dfv1.Pipeline, vertex dfv1.Vertex) (bool, bo
directPressure, downstreamPressure := false, false
loop:
for _, e := range downstreamEdges {
if e.BufferFullWritingStrategy() == dfv1.DiscardLatest {
// If the edge is configured to discard latest on full, we don't consider it as back pressure.
continue
}
vertexKey := pl.Namespace + "/" + pl.Name + "-" + e.To
pendingVal, ok := s.vertexMetricsCache.Get(vertexKey + "/pending")
if !ok { // Vertex key has not been cached, skip it.
Expand Down

0 comments on commit 00e6b6a

Please sign in to comment.