-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: backport improvements to ReadTags pushdowns from 2.x #23302
Conversation
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 do not have enough expertise or context to adequately review this.
return true | ||
} | ||
return false | ||
return y == nil |
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 like this refactor...
@@ -311,6 +355,16 @@ func (s *Store) TagKeys(ctx context.Context, req *datatypes.TagKeysRequest) (cur | |||
if found := reads.HasFieldValueKey(expr); found { | |||
return nil, errors.New("field values unsupported") | |||
} | |||
if found := reads.ExprHasKey(expr, fieldKey); found { |
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 going to be extremely expensive to compute, right? Previously we could always consult the series index for this call, but now we have to go to TSM for every series key/field key combination to find out if data exists for that key.
Do we expect the UI features that require this to be usable for large databases?
0765a22
to
a8a3ebe
Compare
7ac4d28
to
ac720bb
Compare
ac720bb
to
dcd88d6
Compare
@jeffreyssmith2nd - what's the status on this one? |
This passes all the existing tests. It was, however, not the solution to the problem that we originally thought it was. Given its potential to impact performance, I am uncertain of if we want to merge it without a good use requiring it. |
Closing this PR per comments above |
Continuation of #21160, which was a backport of #19856 and #19894.
The backport of #19856 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. This primarily fixed #19794 for 2.x, which contains good examples of the issue, but also fixed #19806, a related issueThe backport of #19894 returns
nil
instead of an empty iterator, and callers expect a non-nil result set for any non-error return, which fixed influxdata/flux#3300 for 2.xThis work was originally shelved due to complications regarding Enterprise compatibility. As it stands now, this work is identical to where #21160 was left off, though I expect that this will have to be adjusted significantly to make work for what we need. Some aspects of the wire-format has changed, so we may want to undo those portions of it, or be prepared to handle it carefully