Skip to content

Commit

Permalink
fix: max lag (#1319)
Browse files Browse the repository at this point in the history
Signed-off-by: jyu6 <juanlu_yu@intuit.com>
(cherry picked from commit 24afc5e)
  • Loading branch information
jy4096 authored and whynowy committed Nov 3, 2023
1 parent 6ab96b1 commit e05132e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/apis/v1/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,12 @@ func (h *handler) GetPipeline(c *gin.Context) {
}
}
// if the data hasn't arrived the sink vertex
// use 0 instead of the initial watermark value -1
// set the lag to be -1
if minWM == -1 {
minWM = 0
lag = -1
} else {
lag = maxWM - minWM
}
lag = maxWM - minWM

pipelineResp := NewPipelineInfo(status, &lag, pl)
c.JSON(http.StatusOK, NewNumaflowAPIResponse(nil, pipelineResp))
Expand Down

0 comments on commit e05132e

Please sign in to comment.