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

tests: get cdc_bench cursor at least 1s after table creation #138854

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

rharding6373
Copy link
Collaborator

Previously, we would get changefeed cursors from the current time after creating a table and before populating it. Due to the time being at a second granularity, it was possible that the cursor could be the same second that the table was created, which would lead to the table not appearing to be created yet.

This change adds a 1s sleep before getting the cursor timestamp, to ensure that we don't encounter this scenario.

Epic: None

Fixes: #137758
Fixes: #135795

Release note: None

Previously, we would get changefeed cursors from the current time after
creating a table and before populating it. Due to the time being at a
second granularity, it was possible that the cursor could be the same
second that the table was created, which would lead to the table not
appearing to be created yet.

This change adds a 1s sleep before getting the cursor timestamp, to
ensure that we don't encounter this scenario.

Epic: None

Fixes: cockroachdb#137758
Fixes: cockroachdb#135795

Release note: None
@rharding6373 rharding6373 requested review from a team and wenyihu6 and removed request for a team January 11, 2025 00:22
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@wenyihu6 wenyihu6 left a comment

Choose a reason for hiding this comment

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

Nice find!

@rharding6373 rharding6373 added backport-23.2.x Flags PRs that need to be backported to 23.2. backport-24.1.x Flags PRs that need to be backported to 24.1. backport-24.2.x Flags PRs that need to be backported to 24.2 backport-24.3.x Flags PRs that need to be backported to 24.3 labels Jan 13, 2025
@rharding6373
Copy link
Collaborator Author

TFTR!

bors r=wenyihu6

@craig craig bot merged commit 52207fd into cockroachdb:master Jan 13, 2025
22 checks passed
Copy link

blathers-crl bot commented Jan 13, 2025

Based on the specified backports for this PR, I applied new labels to the following linked issue(s). Please adjust the labels as needed to match the branches actually affected by the issue(s), including adding any known older branches.


Issue #135795: branch-release-23.2, branch-release-24.1, branch-release-24.2, branch-release-24.3.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.2.x Flags PRs that need to be backported to 23.2. backport-24.1.x Flags PRs that need to be backported to 24.1. backport-24.2.x Flags PRs that need to be backported to 24.2 backport-24.3.x Flags PRs that need to be backported to 24.3
Projects
None yet
3 participants