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
30.15k stars 3.81k forks source link

cdc: provide a warning when creating a changefeed with a cursor that's too far in the past #124290

Open daniel-crlabs opened 6 months ago

daniel-crlabs commented 6 months ago

Is your feature request related to a problem? Please describe.

Currently customers can create changefeeds specifying the cursor option so it starts from that given time. Unfortunately customers might make typos when entering the cursor epoch time and start a cursor with a timestamp that's too far in the past.

This typo could cause the changefeed to lag very far behind if the table is huge and the customer is unaware of this typo.

Describe the solution you'd like

Provide a warning when the customer creates a changefeed to let them know they are creating a changefeed with a cursor that's too far in the past (maybe if the curosr is older than 5 hours from the time the changefeed is being created) and this could cause changefeed latency.

Describe alternatives you've considered

None

Additional context

Customers might attribute the changefeed latency to many other issues and waste time troubleshooting something that's not the real problem or even recognize/realize the problem was caused because they made a typo.

Jira issue: CRDB-38811

Epic CRDB-32401

blathers-crl[bot] commented 6 months ago

cc @cockroachdb/cdc

sksDonni commented 5 months ago

Hi @rharding6373, would like to take this up as my good first ticket to start contributing to cockroachDB. I tried debugging this issue locally, but was prompted for enterprise credentials. Is there a document that I can follow to get my enterprise free trial keys?

rharding6373 commented 5 months ago

Hi @sksDonni, thanks for your interest in contributing! If you need a license, you can get a free trial by messaging our sales team following the instructions here: https://www.cockroachlabs.com/docs/stable/licensing-faqs#obtain-a-license

rharding6373 commented 5 months ago

Alternatively, you can also pick up another good first issue that isn't in the enterprise portion of the database code: https://github.com/cockroachdb/cockroach/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22