-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[IOTDB-1407] Filtering time series based on tags query fails Occasion… #3292
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
Conversation
| globalGroups = metaGroupMember.getPartitionTable().getGlobalGroups(); | ||
| } else { | ||
| PartitionGroup partitionGroup = | ||
| metaGroupMember.getPartitionTable().partitionByPathTime(plan.getPath(), 0); |
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.
show timeseries root.* is not right?
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.
Thanks @mychaow . this is have a situation, root.a.*
I will alter this.
|
Hi, it's better to add some ITs in testContainer for this function |
|
|
||
| List<PartitionGroup> globalGroups = new ArrayList<>(); | ||
| if (IoTDBConstant.PATH_ROOT.equals(plan.getPath().getFullPath()) | ||
| || plan.getPath().getFullPath().contains(IoTDBConstant.PATH_WILDCARD)) { |
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.
As we have supported special characters, how about the timeseries contains asterisk like the following:
root.sg."device_1*".sensor1
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 grammar.... I alter this, support this grammar...
hi , I add some IT in test Container, please review... thanks. |
| try { | ||
| showTimeseries(group, plan, resultSet, context); | ||
| } catch (CheckConsistencyException e) { | ||
| } catch (CheckConsistencyException | MetadataException e) { |
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.
LGTM. But there is one minor issues. This will ignore some errors, resulting in query results have problems. Like we execute show timeseries, some data group failed with other errors exclude tag not found, we will return result.
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 send requests to all DataGroups only for sequences that are not found in partitiontable.
- The general metadata exception is because the DataGroup does not contain the sequence. Therefore, you can skip the metadata exception by default. add only the queried sequences.
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 feel like the previous design here was to ignore all MetaExceptions and read as many as we could.
If we had no intention of changing the design, it would seem pointless to catch this exception?
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.
Thanks , I alter this exception , Same as before.
| try { | ||
| showTimeseries(group, plan, resultSet, context); | ||
| } catch (CheckConsistencyException e) { | ||
| } catch (CheckConsistencyException | MetadataException e) { |
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 feel like the previous design here was to ignore all MetaExceptions and read as many as we could.
If we had no intention of changing the design, it would seem pointless to catch this exception?
| writeStatement.execute(createTimeSeries1); | ||
| writeStatement.execute(createTimeSeries2); | ||
| // try to read data on each node. select .* | ||
| for (Statement readStatement : readStatements) { |
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.
what about adding some corner cases,such as SHOW TIMESERIES root.ln.wf01.* where tag1=v3, HOW TIMESERIES root.ln.wf01.* where tag3=v1
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.
Thanks, done.
|
Coverage increased (+0.02%) to 68.123% when pulling bc8035b on wangchao316:IOTDB-1407 into f1bc4e3 on apache:master. |
mychaow
left a 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.
LGTM
neuyilan
left a 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.
LGTM
https://issues.apache.org/jira/browse/IOTDB-1407
5 node , 3 rep.
Connect to the client.
Run the show timeseries root.turbine where owner=user1 command.
throw : The key owner is not a tag.
reason:
When the number of nodes is greater than the number of replicas, querying a sequence label is broadcast to all DataGroups. Some DataGroups do not contain the sequence. Therefore, an error is reported when querying the label. As a result, an error is reported for the entire query.
solved:
When the root sequence is queried, all DataGroup queries are broadcast.
When a subsequence is queried, the data group of the corresponding subsequence is queried.