-
Notifications
You must be signed in to change notification settings - Fork 556
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
Use node fields instead of custom queuing algorithm to count children checked #9154
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1b23c2e
to
8ff7631
Compare
francoposa
approved these changes
Aug 31, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, pending the below patch to the benchmark test which caught some bugs when I was exploring an alternate implementation.
(artistic license allowed on the comment wording)
% git diff pkg/scheduler/queue/multi_queuing_algorithm_tree_queue_benchmark_test.go
diff --git a/pkg/scheduler/queue/multi_queuing_algorithm_tree_queue_benchmark_test.go b/pkg/scheduler/queue/multi_queuing_algorithm_tree_queue_benchmark_test.go
index 95e7ea8a3..34e455d8d 100644
--- a/pkg/scheduler/queue/multi_queuing_algorithm_tree_queue_benchmark_test.go
+++ b/pkg/scheduler/queue/multi_queuing_algorithm_tree_queue_benchmark_test.go
@@ -347,8 +347,6 @@ func TestMultiDimensionalQueueAlgorithmSlowConsumerEffects(t *testing.T) {
},
}
- maxQueriersPerTenant := 0 // disable shuffle sharding
-
// Increase totalRequests to tighten up variations when running locally, but do not commit higher values;
// the later test cases with a higher percentage of slow queries will take a long time to run.
totalRequests := 1000
@@ -365,6 +363,12 @@ func TestMultiDimensionalQueueAlgorithmSlowConsumerEffects(t *testing.T) {
// an ingester can respond in 0.3 seconds while a slow store-gateway query can take 30 seconds
slowConsumerLatency := 100 * time.Millisecond
+ // enable shuffle sharding; we cannot be too restrictive with only two tenants,
+ // or some consumers will not get sharded to any of the two tenants.
+ // enabling shuffle sharding ensures we will hit cases where a querier-worker
+ // does not find any tenant leaf nodes it can work on under its prioritized query component node
+ maxQueriersPerTenant := numConsumers - 1
+
var testCaseNames []string
testCaseReports := map[string]*testScenarioQueueDurationReport{}
francoposa
pushed a commit
that referenced
this pull request
Sep 3, 2024
… checked (#9154) (#9187) * Use node fields instead of custom queuing algorithm to count children checked * Fix subtle bug introduced by defining leaf nodes * add Franco's patch to benchmark test (cherry picked from commit 0084380) Co-authored-by: chencs <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does
Updates
QuerierWorkerQueuePriorityAlgo
to use theNode
'schildrenChecked
field instead of keeping its own count of nodes checked; this lets the tree reset the count after the dequeue operation is completed. This also includes a small bugfix introduced totenantQuerierAssignments
by defining leaf nodes.Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.