qiaojialin commented on a change in pull request #59: add partition start and 
end offset constraints when loading chunkGroupMetaData 
URL: https://github.com/apache/incubator-iotdb/pull/59#discussion_r259563715
 
 

 ##########
 File path: 
tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java
 ##########
 @@ -172,4 +208,19 @@ public void loadChunkMetaDatas(List<Path> paths) throws 
IOException {
     return chunkMetaDataList;
   }
 
+  private boolean checkAccess(ChunkGroupMetaData chunkGroupMetaData) {
+    if (!partitionMode) {
+      return true; // always true
+    }
+    long startOffsetOfChunkGroup = 
chunkGroupMetaData.getStartOffsetOfChunkGroup();
+    long endOffsetOfChunkGroup = chunkGroupMetaData.getEndOffsetOfChunkGroup();
+    long middleOffsetOfChunkGroup = (startOffsetOfChunkGroup + 
endOffsetOfChunkGroup) / 2;
+    if (partitionStartOffset < middleOffsetOfChunkGroup
+        && middleOffsetOfChunkGroup <= partitionEndOffset) {
 
 Review comment:
   Please check whether the partitionEndOffset and partitionStartOffset of two 
consecutive partitions are equal.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to