Use global sink executor pool for IoTV2#16163
Merged
jt2594838 merged 14 commits intoapache:masterfrom Sep 3, 2025
Merged
Conversation
added 4 commits
August 13, 2025 11:11
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/subtask/sink/PipeSinkSubtaskManager.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/PipeConsensusSubtaskExecutor.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/pipeconsensus/PipeConsensusAsyncSink.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/pipeconsensus/PipeConsensusSyncSink.java
Caideyipi
reviewed
Aug 13, 2025
...core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/stage/PipeTaskSinkStage.java
Outdated
Show resolved
Hide resolved
...anode/src/main/java/org/apache/iotdb/db/pipe/agent/task/builder/PipeDataNodeTaskBuilder.java
Outdated
Show resolved
Hide resolved
Collaborator
There was a problem hiding this comment.
May this be directly configurable?
Collaborator
Author
There was a problem hiding this comment.
I think there is no need to configure this.
- users may not aware of this configuration and I think most users have no idea for configuring this.
- the soft limit of data region can be approximated, that we just set core size to this soft limit is fine.
added 3 commits
August 22, 2025 10:04
jt2594838
reviewed
Aug 27, 2025
.../datanode/src/main/java/org/apache/iotdb/db/pipe/consensus/PipeConsensusSubtaskExecutor.java
Outdated
Show resolved
Hide resolved
JackieTien97
pushed a commit
that referenced
this pull request
Dec 16, 2025
* use global sink executor pool for IoTV2 * resolve conflict * resolve conflict * fix review * fix * fix comment * fix review * fix ci * fix * fix it npe * fix --------- Co-authored-by: 彭俊植 <junzhi.peng@pingcap.com> (cherry picked from commit 68da097)
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.
As IoTV2's sink num is equals to data regions num, and data regions num is limited and strictly controlled, there is no need for IoTV2 to use separate executor pool for each sink, which may cause threads booming.
So we use global singleton executor pool for all of IoTV2 sinks.
Use fixedThreadPool here, and its core size is carefully set to Min(cpu cores num, data region soft limit).