Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce stack message of last time check exception for read chunk compaction performer #11927

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
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;
Expand Down Expand Up @@ -62,7 +63,8 @@ public ReadChunkCompactionPerformer() {}

@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)
Expand Down Expand Up @@ -121,7 +123,7 @@ private void compactAlignedSeries(
TsFileResource targetResource,
CompactionTsFileWriter writer,
MultiTsFileDeviceIterator deviceIterator)
throws IOException, InterruptedException, IllegalPathException {
throws IOException, InterruptedException, IllegalPathException, PageException {
checkThreadInterrupted();
LinkedList<Pair<TsFileSequenceReader, List<AlignedChunkMetadata>>> readerAndChunkMetadataList =
deviceIterator.getReaderAndChunkMetadataForCurrentAlignedSeries();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private void collectValueColumnSchemaList() throws IOException {
}
}

public void execute() throws IOException {
public void execute() throws IOException, PageException {
while (!readerAndChunkMetadataList.isEmpty()) {
Pair<TsFileSequenceReader, List<AlignedChunkMetadata>> readerListPair =
readerAndChunkMetadataList.removeFirst();
Expand All @@ -162,12 +162,7 @@ public void execute() throws IOException {
((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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
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;
Expand Down Expand Up @@ -83,7 +84,8 @@ public void tearDown() throws IOException, StorageEngineException {

@Test
public void testSimpleCompactionByFlushChunk()
throws IOException, StorageEngineException, InterruptedException, MetadataException {
throws IOException, StorageEngineException, InterruptedException, MetadataException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down Expand Up @@ -128,7 +130,8 @@ public void testSimpleCompactionByFlushChunk()

@Test
public void testSimpleCompactionWithNullColumnByFlushChunk()
throws IOException, StorageEngineException, InterruptedException, MetadataException {
throws IOException, StorageEngineException, InterruptedException, MetadataException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down Expand Up @@ -173,7 +176,8 @@ public void testSimpleCompactionWithNullColumnByFlushChunk()

@Test
public void testSimpleCompactionWithAllDeletedColumnByFlushChunk()
throws IOException, StorageEngineException, InterruptedException, MetadataException {
throws IOException, StorageEngineException, InterruptedException, MetadataException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down Expand Up @@ -223,7 +227,8 @@ public void testSimpleCompactionWithAllDeletedColumnByFlushChunk()

@Test
public void testSimpleCompactionWithNotExistColumnByFlushChunk()
throws IOException, StorageEngineException, InterruptedException, MetadataException {
throws IOException, StorageEngineException, InterruptedException, MetadataException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down Expand Up @@ -273,7 +278,8 @@ public void testSimpleCompactionWithNotExistColumnByFlushChunk()

@Test
public void testSimpleCompactionWithPartialDeletedColumnByFlushChunk()
throws IOException, StorageEngineException, InterruptedException, MetadataException {
throws IOException, StorageEngineException, InterruptedException, MetadataException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down Expand Up @@ -374,7 +380,8 @@ public void testSimpleCompactionWithAllDeletedPageByFlushPage() throws Exception

@Test
public void testSimpleCompactionWithPartialDeletedPageByWritePoint()
throws IOException, MetadataException, StorageEngineException, InterruptedException {
throws IOException, MetadataException, StorageEngineException, InterruptedException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down Expand Up @@ -425,7 +432,8 @@ public void testSimpleCompactionWithPartialDeletedPageByWritePoint()

@Test
public void testSimpleCompactionByFlushPage()
throws IOException, StorageEngineException, InterruptedException, MetadataException {
throws IOException, StorageEngineException, InterruptedException, MetadataException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down Expand Up @@ -470,7 +478,8 @@ public void testSimpleCompactionByFlushPage()

@Test
public void testSimpleCompactionByWritePoint()
throws IOException, StorageEngineException, InterruptedException, MetadataException {
throws IOException, StorageEngineException, InterruptedException, MetadataException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down Expand Up @@ -515,7 +524,8 @@ public void testSimpleCompactionByWritePoint()

@Test
public void testCompactionWithDifferentCompressionTypeOrEncoding()
throws IOException, StorageEngineException, InterruptedException, MetadataException {
throws IOException, StorageEngineException, InterruptedException, MetadataException,
PageException {
TsFileResource seqResource1 =
generateSingleAlignedSeriesFile(
"d0",
Expand Down