Fix resource group concurrency for multi coordinator #16956
Merged
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.
When a burst of traffic comes to coordinator, it ended up running more than allowed queries.
Two reasons for that:
shouldWaitForResourceManagerUpdate to return always true for non leaf resource groups. So if the traffic is coming from
lot of different resource groups, coordinator end up running less than allowed in each resource group but at root level it
ends up running more.
to run more than allowed queries at a cluster level.
As part of this diff we are fixing 1 by stamping last running query to all it's parent resource groups. And to address 2, making
cache refresh rate and expiration configerable.
Test plan - Unit test + regression test on verifier cluster