[IOTDB-2807]Speed up the cross space compaction by multi-threads#5415
Merged
qiaojialin merged 19 commits intoapache:masterfrom Apr 9, 2022
Merged
[IOTDB-2807]Speed up the cross space compaction by multi-threads#5415qiaojialin merged 19 commits intoapache:masterfrom
qiaojialin merged 19 commits intoapache:masterfrom
Conversation
qiaojialin
reviewed
Apr 5, 2022
| try { | ||
| futures.get(i).get(); | ||
| } catch (InterruptedException | ExecutionException e) { | ||
| logger.error("SubCompactionTask meet errors ", e); |
server/src/main/java/org/apache/iotdb/db/engine/compaction/writer/AbstractCompactionWriter.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/compaction/writer/AbstractCompactionWriter.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/apache/iotdb/db/engine/compaction/writer/CrossSpaceCompactionWriter.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/apache/iotdb/db/engine/compaction/writer/CrossSpaceCompactionWriter.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/apache/iotdb/db/engine/compaction/writer/InnerSpaceCompactionWriter.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/apache/iotdb/db/engine/compaction/writer/InnerSpaceCompactionWriter.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/iotdb/db/engine/compaction/CompactionUtils.java
Outdated
Show resolved
Hide resolved
THUMarkLau
requested changes
Apr 5, 2022
Contributor
THUMarkLau
left a comment
There was a problem hiding this comment.
Do we need to have a performance report for this PR before it is merged?
| } catch (PathNotExistException e) { | ||
| logger.info("A deleted path is skipped: {}", e.getMessage()); | ||
| continue; | ||
| if (measurementsForEachSubTask[idx % subTaskNums] == null) { |
Contributor
There was a problem hiding this comment.
Is it necessary to hash here? If the hash is not uniform, then the effect of multithreading could not be worse. Why not just use a concurrency stack or queue, each sub-thread get a measurement to compact when it is available.
Contributor
Author
There was a problem hiding this comment.
Each sub task has its own hashset, so this won't happen.
| } catch (InterruptedException | ExecutionException e) { | ||
| logger.error("SubCompactionTask meet errors ", e); | ||
| Thread.interrupted(); | ||
| throw new IOException(e); |
Contributor
There was a problem hiding this comment.
Throw a InterruptedException instead.
…r, and the following threads will directly flush Chunk
qiaojialin
reviewed
Apr 8, 2022
| int fileIndex = seqFileIndexArray[subTaskId]; | ||
| writeRateLimit(chunkWriterMap.get(subTaskId).estimateMaxSeriesMemSize()); | ||
| while (hasTargetFileStartChunkGroup[fileIndex].get() == 1) { | ||
| // wait until the target file has finished flushing chunk group header |
qiaojialin
reviewed
Apr 9, 2022
| out.flush(); | ||
| } | ||
|
|
||
| public void truncate(long truncateSize) throws IOException { |
Member
There was a problem hiding this comment.
Suggested change
| public void truncate(long truncateSize) throws IOException { | |
| public void truncate(long offset) throws IOException { |
qiaojialin
approved these changes
Apr 9, 2022
xinzhongtianxia
pushed a commit
to xinzhongtianxia/iotdb
that referenced
this pull request
Apr 11, 2022
…er_meta * remotes/upstream/master: [IOTDB-2872] Rename vsg to dataRegion (apache#5470) [IOTDB-2806][InfluxDB] Compatibility of Apache IoTDB with InfluxDB - Complete UserGuide (apache#5351) [IOTDB-2658] Generate logical plan for query statement —— UT & Raw Data Query & Aggregation Query (apache#5469) [IOTDB-1614] New WAL (apache#5320) Update ContributeGuide.md (apache#5463) user SerializeDeserializeUtil in confignode/AuthorPlan (apache#5467) Modify the jdbc query time column to be empty (apache#5281) [IOTDB-2827] Batch insert in new cluster (apache#5412) [IOTDB-2801] New storage engine framework (apache#5357) [IOTDB-2807]Speed up the cross space compaction by multi-threads (apache#5415) Fix coverage check [IOTDB-2864] Fix Read-only occurred when insert Text values to aligned timeseries (apache#5460) [IOTDB-2803]add AlterTimeSeriesNode and CreateAlignedTimeSeriesNode to PlanNodeType and its serialize and deserialize (apache#5444) [IOTDB-2841] add permission manager model (apache#5401) # Conflicts: # server/src/main/java/org/apache/iotdb/db/mpp/sql/analyze/Analyzer.java # server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/DistributionPlanner.java # server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/LogicalPlanner.java # server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/PlanFragment.java # server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/PlanNodeType.java # server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/metedata/read/DevicesMetaScanNode.java # server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/source/SeriesScanNode.java # server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/plan/node/source/SourceNode.java # server/src/main/java/org/apache/iotdb/db/mpp/sql/statement/StatementVisitor.java # server/src/test/java/org/apache/iotdb/db/mpp/sql/plan/LogicalPlannerTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cross space comapction execution performance of 0.13.0 is slower than 0.12.5.
Need to speed up.
We achieve parallel reading and writing at the measurement level by adding threads.