-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix: make tagKeys and tagValues work for edge cases involving _field #19856
Conversation
59dd302
to
84a3638
Compare
I had to re-skip the Flux test The tip of Flux master has more tests (all of which pass against this branch), and also fixes this issue with the test. I made a note for myself to unskip this test after Flux has upgraded on Monday. |
e729af3
to
8fce8f4
Compare
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.
Looks great to me, @wolffcm – I had one suggestion to improve a struct iteration, as I've seen these loops show up in profiles in the past. Happy to skip the change in this PR and we can address it in a subsequent update if it shows up in profiles.
// tagValuesSlow will determine the tag values for the given tagKey. | ||
// It's generally faster to use tagValues, measurementFields or | ||
// MeasurementNames, but those methods will only use the index and metadata | ||
// stored in the shard. Because fields are not themselves indexed, we have no way | ||
// of correlating fields to tag values, so we sometimes need to consult tsm to | ||
// provide an accurate answer. |
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.
Appreciate the detailed comment 👍
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 is great!
Fixes #19806
Fixes #19794
This updates the
tagKeys
andtagValues
methods of theStore
interface to return the answers that Flux is used to, by properly filtering on_field
when such a predicate is present. These methods are frequently used by the UI query builder to describe the shape of the users data.