Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.57 KB

changefeed-management.md

File metadata and controls

24 lines (16 loc) · 1.57 KB

Procedure: Changefeed Management

About this Procedure

Change data capture (CDC) provides efficient, distributed, row-level changefeeds into a configurable sink for downstream processing such as reporting, caching, or full-text indexing.

This document's purpose is to outline changefeed management tasks during routine changes to the cluster and database. Changefeed sinks and options are well documented cockroachlabs.com and will not be covered here.

Changefeed During Cluster Maintenance

Changefeeds work as jobs in CockroachDB. Jobs in CockroachDB is assigned to a single node in the cluster called the coordinator node. When the coordinator node is impacted by an upgrade or resizing activities, another node will take over the task. Keeping changefeeds running during cluster maintenance will incur additional overhead and risk so it is advisable to pause and resume all changefeeds using the following:

PAUSE JOBS (SELECT * FROM [SHOW CHANGEFEED JOBS] WHERE status = ('running'));
RESUME JOBS (SELECT * FROM [SHOW CHANGEFEED JOBS] WHERE status = ('paused'));

If changefeeds must be running at all times even during cluster maintenance, use prometheus alerts to ensure that changefeeds do not fall behind or stop altogether.