You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/02/18 08:15:57 UTC

[GitHub] [iotdb] mychaow commented on a change in pull request #2566: add some comments for SeriesReader

mychaow commented on a change in pull request #2566:
URL: https://github.com/apache/iotdb/pull/2566#discussion_r578211867



##########
File path: server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java
##########
@@ -390,15 +390,36 @@ boolean hasNextPage() throws IOException {
       /*
        * first chunk metadata is already unpacked, consume cached pages
        */
-      initFirstPageReader();
-      if (firstPageReader != null) {
-        long endpointTime = orderUtils.getOverlapCheckTime(firstPageReader.getStatistics());
-        unpackAllOverlappedTsFilesToTimeSeriesMetadata(endpointTime);
-        unpackAllOverlappedTimeSeriesMetadataToCachedChunkMetadata(endpointTime, false);
-        unpackAllOverlappedChunkMetadataToCachedPageReaders(endpointTime, false);
+      unpackFirstPageReader();
+    }
+
+    if (isExistOverlappedPage()) {
+      return true;
+    }
+
+    // make sure firstPageReader won't be null while cachedPageReaders has more cached page readers

Review comment:
       Thanks for detailed review. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org