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

Fix race in TestMultiDimensionalQueueAlgorithmSlowConsumerEffects #9360

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

chencs
Copy link
Contributor

@chencs chencs commented Sep 20, 2024

What this PR does

Fixes a race condition introduced to a test by #9190. This race condition is exposed by a idiosyncracy of the test, and would not happen under normal operating conditions.

tenantQuerierAssignments.setup() will (predictably) result in a race if you are reusing the same tenantQuerierAssignments value for multiple tree queues running in parallel.

There's an open question as to whether this test should run all the time, or if it should be changed to a benchmark which is only run at-will. I'm leaving that for @francoposa to decide.

Which issue(s) this PR fixes or relates to

Fixes #9253

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

@chencs chencs force-pushed the casie/fix-test-race branch 2 times, most recently from 0721121 to 69f7602 Compare September 20, 2024 20:34
@chencs chencs marked this pull request as ready for review September 20, 2024 20:36
@chencs chencs requested a review from a team as a code owner September 20, 2024 20:36
tqa := newTenantQuerierAssignments()
tqaNonFlipped := newTenantQuerierAssignments()
tqaFlipped := newTenantQuerierAssignments()
tqaQuerierWorkerPrioritization := newTenantQuerierAssignments()
Copy link
Member

Choose a reason for hiding this comment

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

could just initialize them right in the tree constructor the same way we do the round robin states since we never reference them again, but nbd

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do reference them again in the treeScenarios initialization

@chencs chencs merged commit de72ed2 into main Sep 24, 2024
29 checks passed
@chencs chencs deleted the casie/fix-test-race branch September 24, 2024 17:35
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.

Race observed in TestMultiDimensionalQueueAlgorithmSlowConsumerEffects test.
2 participants