cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.96k stars 3.79k forks source link

changefeedccl: fix flush_hist_nanos callback in cloud storage and webhook sinks #121248

Open rharding6373 opened 6 months ago

rharding6373 commented 6 months ago

The webhook v1 and cloud storage sinks both execute a callback to update the changefeed.flush_hist_nanos metric immediately, which is inaccurate. For webhook, the callback should be deferred. In the cloud storage sink, we already execute a callback in the async flush code path, so we could eliminate the bad callback and instead add one on the sync flush code path.

Jira issue: CRDB-37153

Epic CRDB-37337

blathers-crl[bot] commented 6 months ago

cc @cockroachdb/cdc