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

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


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

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)

Reply via email to