You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2021/01/27 03:48:37 UTC

[iotdb] branch firstChunk created (now a05ed2e)

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a change to branch firstChunk
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at a05ed2e  first chunkmetadata should be consumed first (#2547)

This branch includes the following new commits:

     new a05ed2e  first chunkmetadata should be consumed first (#2547)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: first chunkmetadata should be consumed first (#2547)

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch firstChunk
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit a05ed2e71d01da761a9164cefe71f2416975f1c2
Author: Xiangwei Wei <34...@users.noreply.github.com>
AuthorDate: Thu Jan 21 21:19:33 2021 +0800

    first chunkmetadata should be consumed first (#2547)
    
    first chunkmetadata should be consumed first
---
 .../org/apache/iotdb/db/query/reader/series/SeriesReader.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java b/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java
index b433bae..297d57b 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java
@@ -448,15 +448,15 @@ public class SeriesReader {
 
   private void unpackAllOverlappedChunkMetadataToCachedPageReaders(long endpointTime, boolean init)
       throws IOException {
-    while (!cachedChunkMetadata.isEmpty() &&
-        orderUtils.isOverlapped(endpointTime, cachedChunkMetadata.peek().getStatistics())) {
-      unpackOneChunkMetaData(cachedChunkMetadata.poll());
-    }
     if (firstChunkMetadata != null &&
         orderUtils.isOverlapped(endpointTime, firstChunkMetadata.getStatistics())) {
       unpackOneChunkMetaData(firstChunkMetadata);
       firstChunkMetadata = null;
     }
+    while (!cachedChunkMetadata.isEmpty() &&
+        orderUtils.isOverlapped(endpointTime, cachedChunkMetadata.peek().getStatistics())) {
+      unpackOneChunkMetaData(cachedChunkMetadata.poll());
+    }
     if (init && firstPageReader == null && (!seqPageReaders.isEmpty() || !unSeqPageReaders
         .isEmpty())) {
       initFirstPageReader();