yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
9k stars 1.07k forks source link

[CDCSDK] Add yb-admin commands for changing CDCSDK metadata on cdc_state table #16000

Open adithya-kb opened 1 year ago

adithya-kb commented 1 year ago

Jira Link: DB-5409

adithya-kb commented 1 year ago

Add arguments to achieve:

  1. Setting checkpoint of table / stream to -1.-1 or provided checkpoint (change LastReplicatedTime will be set to 0, clear cdc_data)
  2. Setting checkpoint of tablet/ stream to -1.-1 or provided checkpoint
  3. Setting checkpoint of all tablets of stream to -1.-1 or provided checkpoint
  4. Unexpire an expired stream by changing last_active_time
adithya-kb commented 1 year ago

Name of the command: ModifyCDCSDKMetadata Valid combinations :

  1. stream_id
  2. stream_id, checkpoint
  3. table_id, stream_id
  4. table_id, stream_id, checkpoint
  5. tablet_id, stream_id
  6. tablet_id, stream_id, checkpoint
  7. stream_id, unexpire option set to true