You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "yanze chen (Jira)" <ji...@apache.org> on 2022/03/16 07:44:00 UTC
[jira] [Commented] (IOTDB-2749) [load tsfile][template]Can not get child s_0
[ https://issues.apache.org/jira/browse/IOTDB-2749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17507392#comment-17507392 ]
yanze chen commented on IOTDB-2749:
-----------------------------------
Replay bug steps:
# load mlog.bin [^mlog.bin]
# exucute `load '/Users/chenyanze/projects/JavaProjects/iotdb/test/1647339089973-1-0-0.tsfile' sglevel=2`
[^1647339089973-1-0-0.tsfile]
I think this bug is caused by the function isPathExist. If schema template is used, it will update cur by upperTemplate.getDirectNode(nodeNames[i]) and excute cur.getChild(nodeNames[i]) again. Add an else condition before cur.getChild(nodeNames[i]) may solve this problem.
{code:java}
//MTree.java
public boolean isPathExist(PartialPath path) {
String[] nodeNames = path.getNodes();
IMNode cur = root;
if (!nodeNames[0].equals(root.getName())) {
return false;
}
Template upperTemplate = cur.getSchemaTemplate();
for (int i = 1; i < nodeNames.length; i++) {
if (!cur.hasChild(nodeNames[i])) {
if (!cur.isUseTemplate() || upperTemplate.getDirectNode(nodeNames[i]) == null) {
return false;
}
cur = upperTemplate.getDirectNode(nodeNames[i]);
}
cur = cur.getChild(nodeNames[i]);
if (cur.isMeasurement()) {
return i == nodeNames.length - 1;
}
upperTemplate = cur.getSchemaTemplate() == null ? upperTemplate : cur.getSchemaTemplate();
}
return true;
} {code}
> [load tsfile][template]Can not get child s_0
> --------------------------------------------
>
> Key: IOTDB-2749
> URL: https://issues.apache.org/jira/browse/IOTDB-2749
> Project: Apache IoTDB
> Issue Type: Bug
> Affects Versions: 0.13.0-SNAPSHOT
> Reporter: FengQingxin
> Assignee: yanze chen
> Priority: Major
> Attachments: 1647339089973-1-0-0.tsfile, a4581503dd13191b31e673bdc41f3ea.png, config.properties, image-2022-03-16-09-17-27-684.png, mlog.bin, mlog.txt
>
>
> Hi IoTDBers
> When I use load function to load tsfile into an iotdb instance,I met an error like below picture:
> !image-2022-03-16-09-17-27-684.png!
> These ts files are made by iotdb-benchmark(and the same iotdb instance).So they has the same schema.
> About the benchmark config please refer to the attachment.
> # 是否使用template
> TEMPLATE=true
> # 是否使用vector
> VECTOR=false
> Please help us to check this.
> Thanks!
> B.R.
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)