From cd583155dec65a7de7dbb97f231d39ccb72b058f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Fri, 15 Nov 2024 16:24:57 +0000 Subject: [PATCH] cdc graph: fix filtering not including flow_name (#2261) --- flow/cmd/mirror_status.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/cmd/mirror_status.go b/flow/cmd/mirror_status.go index 58cf20a80..156185054 100644 --- a/flow/cmd/mirror_status.go +++ b/flow/cmd/mirror_status.go @@ -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 }