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

changefeedccl: make mock pulsar sink synchronous #123228

Merged
merged 1 commit into from May 6, 2024

Conversation

rharding6373
Copy link
Collaborator

Although the comments in mock pulsar sink say that emitting messages and flushing are synchronous, the use of a buffered channel to transmit messages from the mock producer to the test feed makes it asynchronous. This leads to problems where the consumer (the test) may not have stored the data in a "durable" way before the changefeed job completes. As a result, tests can be flaky as it does not always look like all rows have been emitted.

This PR makes the mock pulsar sink synchronous by using an unbuffered channel.

Fixes: #119289
Informs: #118899

Epic: CRDB-9180

Release note: None

@rharding6373 rharding6373 requested a review from a team as a code owner April 29, 2024 17:22
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Although the comments in mock pulsar sink say that emitting messages and
flushing are synchronous, the use of a buffered channel to transmit
messages from the mock producer to the test feed makes it asynchronous.
This leads to problems where the consumer (the test) may not have stored
the data in a "durable" way before the changefeed job completes. As a
result, tests can be flaky as it does not always look like all rows have
been emitted.

This PR makes the mock pulsar sink synchronous by using an unbuffered
channel.

Fixes: cockroachdb#119289
Informs: cockroachdb#118899

Epic: CRDB-9180

Release note: None
@rharding6373
Copy link
Collaborator Author

The unit test failure is a flake.

bors r=asg0451

@craig craig bot merged commit e6ade03 into cockroachdb:master May 6, 2024
20 of 22 checks passed
craig bot pushed a commit that referenced this pull request May 7, 2024
123791: Revert "changefeedccl: make mock pulsar sink synchronous" r=rharding6373 a=rharding6373

Reverts #123228

This is causing flaky pulsar tests (e.g., #123720)

Epic: None

Release note: none

Co-authored-by: Rachael Harding <rharding6373@users.noreply.github.com>
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.

ccl/changefeedccl: unskip TestChangefeedOnlyInitialScanCSV for pulsar sink
3 participants