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

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


The following commit(s) were added to refs/heads/master by this push:
     new 69202a94a51 reduce stack message of last time check exception for read 
chunk compaction performer (#11927)
69202a94a51 is described below

commit 69202a94a5123bff6063626a1b6778417530ce53
Author: shuwenwei <[email protected]>
AuthorDate: Tue Jan 23 09:41:28 2024 +0800

    reduce stack message of last time check exception for read chunk compaction 
performer (#11927)
---
 .../impl/ReadChunkCompactionPerformer.java         |  6 +++--
 .../ReadChunkAlignedSeriesCompactionExecutor.java  |  9 ++-----
 ...nkCompactionPerformerWithAlignedSeriesTest.java | 28 +++++++++++++++-------
 3 files changed, 25 insertions(+), 18 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadChunkCompactionPerformer.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadChunkCompactionPerformer.java
index 870c35deca1..daed9052bbf 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadChunkCompactionPerformer.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/performer/impl/ReadChunkCompactionPerformer.java
@@ -35,6 +35,7 @@ import 
org.apache.iotdb.db.storageengine.dataregion.compaction.io.CompactionTsFi
 import 
org.apache.iotdb.db.storageengine.dataregion.compaction.schedule.constant.CompactionType;
 import org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource;
 import org.apache.iotdb.db.storageengine.rescon.memory.SystemInfo;
+import org.apache.iotdb.tsfile.exception.write.PageException;
 import org.apache.iotdb.tsfile.file.metadata.AlignedChunkMetadata;
 import org.apache.iotdb.tsfile.file.metadata.ChunkMetadata;
 import org.apache.iotdb.tsfile.read.TsFileSequenceReader;
@@ -62,7 +63,8 @@ public class ReadChunkCompactionPerformer implements 
ISeqCompactionPerformer {
 
   @Override
   public void perform()
-      throws IOException, MetadataException, InterruptedException, 
StorageEngineException {
+      throws IOException, MetadataException, InterruptedException, 
StorageEngineException,
+          PageException {
     // size for file writer is 5% of per compaction task memory budget
     long sizeForFileWriter =
         (long)
@@ -121,7 +123,7 @@ public class ReadChunkCompactionPerformer implements 
ISeqCompactionPerformer {
       TsFileResource targetResource,
       CompactionTsFileWriter writer,
       MultiTsFileDeviceIterator deviceIterator)
-      throws IOException, InterruptedException, IllegalPathException {
+      throws IOException, InterruptedException, IllegalPathException, 
PageException {
     checkThreadInterrupted();
     LinkedList<Pair<TsFileSequenceReader, List<AlignedChunkMetadata>>> 
readerAndChunkMetadataList =
         deviceIterator.getReaderAndChunkMetadataForCurrentAlignedSeries();
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/ReadChunkAlignedSeriesCompactionExecutor.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/ReadChunkAlignedSeriesCompactionExecutor.java
index a70a9832419..8608099b2ea 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/ReadChunkAlignedSeriesCompactionExecutor.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/readchunk/ReadChunkAlignedSeriesCompactionExecutor.java
@@ -151,7 +151,7 @@ public class ReadChunkAlignedSeriesCompactionExecutor {
     }
   }
 
-  public void execute() throws IOException {
+  public void execute() throws IOException, PageException {
     while (!readerAndChunkMetadataList.isEmpty()) {
       Pair<TsFileSequenceReader, List<AlignedChunkMetadata>> readerListPair =
           readerAndChunkMetadataList.removeFirst();
@@ -162,12 +162,7 @@ public class ReadChunkAlignedSeriesCompactionExecutor {
         ((CompactionTsFileReader) reader).markStartOfAlignedSeries();
       }
       for (AlignedChunkMetadata alignedChunkMetadata : 
alignedChunkMetadataList) {
-        try {
-          compactWithAlignedChunk(reader, alignedChunkMetadata);
-        } catch (Exception e) {
-          throw new RuntimeException(
-              "Meet errors when compact aligned series of device: " + device, 
e);
-        }
+        compactWithAlignedChunk(reader, alignedChunkMetadata);
       }
       if (reader instanceof CompactionTsFileReader) {
         ((CompactionTsFileReader) reader).markEndOfAlignedSeries();
diff --git 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/inner/NewReadChunkCompactionPerformerWithAlignedSeriesTest.java
 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/inner/NewReadChunkCompactionPerformerWithAlignedSeriesTest.java
index 02b54233502..5605e198358 100644
--- 
a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/inner/NewReadChunkCompactionPerformerWithAlignedSeriesTest.java
+++ 
b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/inner/NewReadChunkCompactionPerformerWithAlignedSeriesTest.java
@@ -34,6 +34,7 @@ import 
org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResource;
 import 
org.apache.iotdb.db.storageengine.dataregion.tsfile.generator.TsFileNameGenerator;
 import org.apache.iotdb.db.storageengine.dataregion.utils.TsFileResourceUtils;
 import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor;
+import org.apache.iotdb.tsfile.exception.write.PageException;
 import org.apache.iotdb.tsfile.exception.write.WriteProcessException;
 import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType;
 import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
@@ -84,7 +85,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testSimpleCompactionByFlushChunk()
-      throws IOException, StorageEngineException, InterruptedException, 
MetadataException {
+      throws IOException, StorageEngineException, InterruptedException, 
MetadataException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",
@@ -129,7 +131,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testSimpleCompactionWithNullColumnByFlushChunk()
-      throws IOException, StorageEngineException, InterruptedException, 
MetadataException {
+      throws IOException, StorageEngineException, InterruptedException, 
MetadataException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",
@@ -174,7 +177,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testSimpleCompactionWithAllDeletedColumnByFlushChunk()
-      throws IOException, StorageEngineException, InterruptedException, 
MetadataException {
+      throws IOException, StorageEngineException, InterruptedException, 
MetadataException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",
@@ -224,7 +228,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testSimpleCompactionWithNotExistColumnByFlushChunk()
-      throws IOException, StorageEngineException, InterruptedException, 
MetadataException {
+      throws IOException, StorageEngineException, InterruptedException, 
MetadataException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",
@@ -274,7 +279,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testSimpleCompactionWithPartialDeletedColumnByFlushChunk()
-      throws IOException, StorageEngineException, InterruptedException, 
MetadataException {
+      throws IOException, StorageEngineException, InterruptedException, 
MetadataException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",
@@ -375,7 +381,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testSimpleCompactionWithPartialDeletedPageByWritePoint()
-      throws IOException, MetadataException, StorageEngineException, 
InterruptedException {
+      throws IOException, MetadataException, StorageEngineException, 
InterruptedException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",
@@ -426,7 +433,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testSimpleCompactionByFlushPage()
-      throws IOException, StorageEngineException, InterruptedException, 
MetadataException {
+      throws IOException, StorageEngineException, InterruptedException, 
MetadataException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",
@@ -471,7 +479,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testSimpleCompactionByWritePoint()
-      throws IOException, StorageEngineException, InterruptedException, 
MetadataException {
+      throws IOException, StorageEngineException, InterruptedException, 
MetadataException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",
@@ -516,7 +525,8 @@ public class 
NewReadChunkCompactionPerformerWithAlignedSeriesTest extends Abstra
 
   @Test
   public void testCompactionWithDifferentCompressionTypeOrEncoding()
-      throws IOException, StorageEngineException, InterruptedException, 
MetadataException {
+      throws IOException, StorageEngineException, InterruptedException, 
MetadataException,
+          PageException {
     TsFileResource seqResource1 =
         generateSingleAlignedSeriesFile(
             "d0",

Reply via email to