Skip to content
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

checkpoint: Use core changefeed for fast notifications #1020

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

bobvawter
Copy link
Member

@bobvawter bobvawter commented Sep 20, 2024

This change creates a core changefeed over the checkpoints table to allow multiple Replicator instances to notify one another to refresh their view of the table.

H/T: @BramGruneir for the reminder of
https://github.com/bobvawter/cacheroach/blob/512fae9092fc1e48406ef38fbb9959fc749d607f/pkg/store/cdc/cdc.go


This change is Reviewable

Copy link
Member

@BramGruneir BramGruneir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried this is going to need more testing.

Lots of updates quickly. Failure of the stream for some reason, can we redial?

An option to turn this off.

What do you think?

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Jeremyyang920, @sravotto, and @ZhouXing19)

This change creates a core changefeed over the checkpoints table to allow
multiple Replicator instances to notify one another to refresh their view of
the table.

This behavior can be disabled with the `--disableCheckpointStream` flag.

The test framework ensures that the staging cluster has rangefeeds enabled to
support the split-mode test cases (i.e. where the staging cluster is distinct
from the source cluster).

H/T: @BramGruneir for the reminder of
https://github.com/bobvawter/cacheroach/blob/512fae9092fc1e48406ef38fbb9959fc749d607f/pkg/store/cdc/cdc.go
Copy link
Member Author

@bobvawter bobvawter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL. Added a CLI flag and plumbing to disable the feed. Added a test to kill the feed's DB connection and verify that it restarts.

Rapid updates wind up getting debounced in the fastWakeup loop; the call to notify will close the previously-observed channel and it won't be observed again until the refresh has completed. This isn't really any different from an instance receiving multiple resolved-timestamp messages back-to-back.

Reviewable status: 0 of 8 files reviewed, all discussions resolved (waiting on @BramGruneir, @Jeremyyang920, @sravotto, and @ZhouXing19)

Copy link
Member

@BramGruneir BramGruneir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 8 of 8 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Jeremyyang920, @sravotto, and @ZhouXing19)

@bobvawter bobvawter added this pull request to the merge queue Sep 23, 2024
Merged via the queue into master with commit 8d1519f Sep 23, 2024
52 checks passed
@bobvawter bobvawter deleted the bob_checkpoint_feed branch September 23, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants