Skip to content

Use now + 2mins as the end timestamp for change stream read API if the connector endTimestamp is omitted #34967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

changliiu
Copy link
Contributor

V1 change stream can use null end timestamp for the query, however V2 the end timestamp of the query should be NOT NULL, and should be at most 30 mins from the max(now, start_timestamp).

To allow users to still omit the connector endTimestamp field to run the connector forever, but to give a valid endTimestamp when try to query change stream, we set the change stream endTimestamp in this case as now + 2 mins.

This solution works as the Apache beam checkpoints the ReadChangeStreamPartition execution every 5s or 5MB of output data produced.
Moreover the change stream query has a hard 1 min deadline.

@changliiu changliiu force-pushed the refactor-run-forever branch 4 times, most recently from 4d78dc3 to 6d6b262 Compare May 16, 2025 23:14
@changliiu changliiu marked this pull request as ready for review May 16, 2025 23:15
@changliiu changliiu force-pushed the refactor-run-forever branch from 6d6b262 to 953531c Compare May 16, 2025 23:56
Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant