Skip to content

Commit

Permalink
fix(numaproj#1832): scale down to >=min, but not 0
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Wang <[email protected]>
  • Loading branch information
whynowy committed Jul 16, 2024
1 parent fa18f97 commit b70ba04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/reconciler/vertex/scaling/scaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func (s *Scaler) scaleOneVertex(ctx context.Context, key string, worker int) err
// When scaling up, need to check back pressure
directPressure, downstreamPressure := s.hasBackPressure(*pl, *vertex)
if directPressure {
if current > min {
if current > min && current > 1 { // Scale down but not to 0
log.Infof("Vertex %s has direct back pressure from connected vertices, decreasing one replica.", key)
return s.patchVertexReplicas(ctx, vertex, current-1)
} else {
Expand Down

0 comments on commit b70ba04

Please sign in to comment.