[release-16.0] Tablet throttler: fix race condition by removing goroutine call (#14179) #14200
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #14179 into release-16.0
Description
Per #14178, the function
throttler.refreshMySQLInventory()
should run on same goroutine as theselect
clause.A note about testing: this of course would have been caught by race detection. We have a followup PR that make a lot of refactoring to the throttler code, and adds sufficient unit testing to validate the changes and to catch race conditions.
This PR is a one line extract from the followup PR, and without the unit testing. The reasoning is that the refactor is a post-v18 change, while the fix in this PR should be backported to
v18
,v17
andv16
, which cannot support the many changes implied by the unit testing. And so this PR does not include those tests.Said followup PR is #14181.
Related Issue(s)
Fixes #14178
Checklist
Deployment Notes