-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Workload Management] QueryGroupService that orchestrates Resource Tracking & Cancellation #1
base: kp/wlm-cancellation-1
Are you sure you want to change the base?
Conversation
private final ClusterService clusterService; | ||
private final ClusterSettings clusterSettings; | ||
private final Settings settings; |
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.
We should only need settings defined for the feature in WorkloadManagementSettings
class. Hence these member variables are unnecessary instead should only keep WorkloadManagementSettings
instance.
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.
I'm having ClusterSettings & Settings only for setting up the NodeDuressTrackers, aer you proposing to move the node duress tracker into WorkloadManagementSettings class ?
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.
I think it makes sense to include NodeDuressTrackers setup in WorkloadManagementSettings instead of this class, what do you think ?
private final QueryGroupResourceUsageTrackerService queryGroupUsageTracker; | ||
private final TimeValue queryGroupServiceRunIntervalInMillis; | ||
private volatile Scheduler.Cancellable scheduledFuture; | ||
private final ThreadPool threadPool; |
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.
We should also have setting which controls whether the feature is enabled or not
private final ClusterService clusterService; | ||
private final ClusterSettings clusterSettings; | ||
private final Settings settings; | ||
private Set<QueryGroup> activeQueryGroups = new HashSet<>(); |
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.
This should init the query groups from the state metadata because in come cases metadata might have some querygroups since metadata is durable.
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.
Yes, I'm doing this in
protected Set<QueryGroup> getActiveQueryGroups() {
Map<String, QueryGroup> queryGroups = Metadata.builder(clusterService.state().metadata()).getQueryGroups();
return new HashSet<>(queryGroups.values());
}
which is invoked from doRun()
4e846e2
to
80dd918
Compare
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
Signed-off-by: Kiran Prakash <awskiran@amazon.com
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
d8c31ee
to
eb7ad77
Compare
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
@kiranprakash154 Can we close this in favor of: opensearch-project#15925 |
Description
[Workload Management] QueryGroupService that orchestrates Resource Tracking & Cancellation
Related Issues
Resolves - opensearch-project#14883
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Signed-off-by: Kiran Prakash awskiran@amazon.comSigned-off-by: Kiran Prakash awskiran@amazon.comSigned-off-by: Kiran Prakash awskiran@amazon.com