You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by 南京大学软件学院薛恺丰 <82...@qq.com> on 2020/02/26 08:21:14 UTC

回复:[jira] [Created] (IOTDB-524) Sequence File's order isn't right

Hi~
I'm working on this issue and it will be fix soon. XD
------------------&nbsp;原始邮件&nbsp;------------------
发件人:&nbsp;"Yuan Tian (Jira)"<jira@apache.org&gt;;
发送时间:&nbsp;2020年2月26日(星期三) 下午4:20
收件人:&nbsp;"dev"<dev@iotdb.apache.org&gt;;

主题:&nbsp;[jira] [Created] (IOTDB-524) Sequence File's order isn't right



Kaifeng Xue created IOTDB-524:
---------------------------------

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Summary: Sequence File's order isn't right
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Key: IOTDB-524
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; URL: https://issues.apache.org/jira/browse/IOTDB-524
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Project: Apache IoTDB
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Issue Type: Bug
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reporter: Kaifeng Xue


In StorageGroupProcessor, we order sequence file as this:
```
private TreeSet<TsFileResource&gt; sequenceFileTreeSet = new TreeSet<&gt;(
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (o1, o2) -&gt; {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int rangeCompare = o1.getFile().getParentFile().getName()
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .compareTo(o2.getFile().getParentFile().getName());
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return rangeCompare == 0 ? compareFileName(o1.getFile(), o2.getFile()) : rangeCompare;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });
```

We use string comparison rather than number comparison. That's will cause "10" is smaller than "9". Which is a bug



--
This message was sent by Atlassian Jira
(v8.3.4#803005)