diff --git a/server/apis/v1/handler.go b/server/apis/v1/handler.go index 0ff96d6d0..2c97fe961 100644 --- a/server/apis/v1/handler.go +++ b/server/apis/v1/handler.go @@ -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))