Skip to content

Commit

Permalink
cdc graph: fix filtering not including flow_name (#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored Nov 15, 2024
1 parent 27996db commit cd58315
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flow/cmd/mirror_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ func (h *FlowRequestHandler) CDCGraph(ctx context.Context, req *protos.GraphRequ
}
rows, err := h.pool.Query(ctx, `select tm, coalesce(sum(rows_in_batch), 0)
from generate_series(date_trunc($2, now() - $1::INTERVAL * 30), now(), $1::INTERVAL) tm
left join peerdb_stats.cdc_batches on start_time >= tm and start_time < tm + $1::INTERVAL
group by 1 order by 1`, req.AggregateType, truncField)
left join peerdb_stats.cdc_batches on start_time >= tm and start_time < tm + $1::INTERVAL and flow_name = $3
group by 1 order by 1`, req.AggregateType, truncField, req.FlowJobName)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit cd58315

Please sign in to comment.