Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
We judge if data belongs to the seq region or unseq region only by the lastFlushedTime of each device, which makes the following situation possible:
2 seq files and their time ranges: seq1[0, 99], seq2[300, 500]
1 unseq file and its time range: unseq1[150, 200]
Intuitively, we can just make them 3 seq files, which may potentially reduce query overhead.
One solution may be: right after we close one unseq file, we check if it actually overlaps with any seq file(s), and if not, we insert it into a proper position of the seq files instead of keeping it in unseq files. Another merit is that this avoids the case mentioned in https://github.com/apache/iotdb/pull/2920#pullrequestreview-623932806, because each unseq file will definitely overlap at least one seq file.