Skip to content

Conversation

@wangchao316
Copy link
Member

@wangchao316 wangchao316 commented May 31, 2021

https://issues.apache.org/jira/browse/IOTDB-1407
5 node , 3 rep.

  1. Connect to the client.

  2. 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.

@wangchao316
Copy link
Member Author

@LebronAl @neuyilan @mychaow , hi ,could you please reivew?
Thanks..

@mychaow mychaow added 0.12.1 Module - Cluster PRs for the cluster module labels May 31, 2021
globalGroups = metaGroupMember.getPartitionTable().getGlobalGroups();
} else {
PartitionGroup partitionGroup =
metaGroupMember.getPartitionTable().partitionByPathTime(plan.getPath(), 0);
Copy link
Member

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?

Copy link
Member Author

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.

@OneSizeFitsQuorum
Copy link
Contributor

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)) {
Copy link
Member

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

Copy link
Member Author

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...

@wangchao316
Copy link
Member Author

Hi, it's better to add some ITs in testContainer for this function

hi , I add some IT in test Container, please review... thanks.

try {
showTimeseries(group, plan, resultSet, context);
} catch (CheckConsistencyException e) {
} catch (CheckConsistencyException | MetadataException e) {
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We send requests to all DataGroups only for sequences that are not found in partitiontable.
  2. 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.

Copy link
Contributor

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?

Copy link
Member Author

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) {
Copy link
Contributor

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) {
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

@wangchao316 wangchao316 closed this Jul 6, 2021
@wangchao316 wangchao316 reopened this Jul 7, 2021
@wangchao316 wangchao316 added 0.12.2 and removed 0.12.1 labels Jul 7, 2021
@coveralls
Copy link

coveralls commented Jul 7, 2021

Coverage Status

Coverage increased (+0.02%) to 68.123% when pulling bc8035b on wangchao316:IOTDB-1407 into f1bc4e3 on apache:master.

Copy link
Member

@mychaow mychaow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@neuyilan neuyilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module - Cluster PRs for the cluster module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants