Skip to content

Conversation

@foster33
Copy link
Collaborator

@foster33 foster33 commented Apr 11, 2025

This PR is part of #1229

Adds:

  • Query SubPlans into metrics which includes counts of the amount of Document/Shard Range Counts
  • A new query metric page that shows subplans for a given QueryID

This PR will need to be merged in before any other related PRs.

@foster33 foster33 marked this pull request as ready for review April 15, 2025 15:37
@billoley
Copy link
Collaborator

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.

Comment on lines 736 to 744

public Map<String,RangeCounts> getSubPlans() {
return subPlans;
}

public void setSubPlans(Map<String,RangeCounts> subPlans) {
this.subPlans = subPlans;
}

Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

ivakegg
ivakegg previously approved these changes Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants