-
Notifications
You must be signed in to change notification settings - Fork 277
Add Query Subplans to Metrics [Query Metric Service] #2849
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
base: integration
Are you sure you want to change the base?
Conversation
|
It will help to add a few Subplans in populateMetric in QueryMetricTestBase (and erase them where you are testing Subplans). That way, every other test is also testing reading, writing, and combining of Subplans. |
...s/services/query-metric/api/src/main/java/datawave/microservice/querymetric/QueryMetric.java
Outdated
Show resolved
Hide resolved
...ric/service/src/main/java/datawave/microservice/querymetric/handler/QueryMetricCombiner.java
Outdated
Show resolved
Hide resolved
...ric/service/src/main/java/datawave/microservice/querymetric/handler/QueryMetricCombiner.java
Outdated
Show resolved
Hide resolved
...rvices/query-metric/api/src/main/java/datawave/microservice/querymetric/BaseQueryMetric.java
Show resolved
Hide resolved
|
|
||
| public Map<String,RangeCounts> getSubPlans() { | ||
| return subPlans; | ||
| } | ||
|
|
||
| public void setSubPlans(Map<String,RangeCounts> subPlans) { | ||
| this.subPlans = subPlans; | ||
| } | ||
|
|
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.
Is the synchronized in addSubplan / addSubplans really necessary? If so, by returning the object in getSubplans, you are likely allowing non-synchronized access. Also, if multiple threads are accessing this calss, then setSubplans runs the risk of replacing the object that you have synchronized on. Or.... maybe you don't really have multile threads accessing a metric at the same time?
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 removed the synchronized. I do not think multiple threads are accessing a metric at the same time. But... this might need to be double checked.
This PR is part of #1229
Adds:
This PR will need to be merged in before any other related PRs.