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

roachtest/awsdms: fix race condition that can cause panics #96008

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

Jeremyyang920
Copy link
Collaborator

In #95518, we added a new test case to check for a table error during the DMS process. However there is a race when the check happens depending on how quickly tasks have ran and the task ReplicationTaskStats can be nil and we tried to access field on the nil object that was returned from the API call.

This commit checks that the ReplicationTaskStat is not nil before accessing the TablesErrored property.

Fixes: #93305
Release note: None

@Jeremyyang920 Jeremyyang920 requested a review from otan January 26, 2023 17:00
@Jeremyyang920 Jeremyyang920 requested a review from a team as a code owner January 26, 2023 17:00
@Jeremyyang920 Jeremyyang920 requested review from srosenberg and smg260 and removed request for a team January 26, 2023 17:00
@cockroach-teamcity
Copy link
Member

This change is Reviewable

In cockroachdb#95518, we added a new test case to check for a table error
during the DMS process. However there is a race when the check
happens depending on how quickly tasks have ran and the task
ReplicationTaskStats can be nil and we tried to access field
on the nil object that was returned from the API call.

This commit checks that the ReplicationTaskStat is not nil
before accessing the TablesErrored property.

Fixes: cockroachdb#93305
Release note: None
@Jeremyyang920
Copy link
Collaborator Author

bors r=otan

@craig
Copy link
Contributor

craig bot commented Jan 26, 2023

Build succeeded:

@craig craig bot merged commit 32b5345 into cockroachdb:master Jan 26, 2023
@Jeremyyang920 Jeremyyang920 deleted the fix_dms_panic branch January 27, 2023 17:53
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.

roachtest: awsdms failed
3 participants