You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2021/06/25 02:13:10 UTC

[iotdb] branch to0.11chunkbug created (now 7d6e3b9)

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

xiangweiwei pushed a change to branch to0.11chunkbug
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 7d6e3b9  [ISSUE-3316] Fix constructing firstChunkMetaDatahasNextChunk logic in hasNextChunk() (#3444)

This branch includes the following new commits:

     new 7d6e3b9  [ISSUE-3316] Fix constructing firstChunkMetaDatahasNextChunk logic in hasNextChunk() (#3444)

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: [ISSUE-3316] Fix constructing firstChunkMetaDatahasNextChunk logic in hasNextChunk() (#3444)

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

xiangweiwei pushed a commit to branch to0.11chunkbug
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 7d6e3b9dbd57470a3ad756208c756883f31284c6
Author: Xiangwei Wei <34...@users.noreply.github.com>
AuthorDate: Fri Jun 25 10:09:15 2021 +0800

    [ISSUE-3316] Fix constructing firstChunkMetaDatahasNextChunk logic in hasNextChunk() (#3444)
    
    (cherry picked from commit 7ac39ef139e590b566acc60643bd2e29c0cb4bee)
---
 .../java/org/apache/iotdb/db/query/reader/series/SeriesReader.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 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 fe827ac..87fa80a 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
@@ -263,13 +263,16 @@ public class SeriesReader {
       /*
        * first time series metadata is already unpacked, consume cached ChunkMetadata
        */
-      if (!cachedChunkMetadata.isEmpty()) {
+      while (!cachedChunkMetadata.isEmpty()) {
         firstChunkMetadata = cachedChunkMetadata.peek();
         unpackAllOverlappedTsFilesToTimeSeriesMetadata(
             orderUtils.getOverlapCheckTime(firstChunkMetadata.getStatistics()));
         unpackAllOverlappedTimeSeriesMetadataToCachedChunkMetadata(
             orderUtils.getOverlapCheckTime(firstChunkMetadata.getStatistics()), false);
-        firstChunkMetadata = cachedChunkMetadata.poll();
+        if (firstChunkMetadata.equals(cachedChunkMetadata.peek())) {
+          firstChunkMetadata = cachedChunkMetadata.poll();
+          break;
+        }
       }
     }