Skip to content

Use global sink executor pool for IoTV2#16163

Merged
jt2594838 merged 14 commits intoapache:masterfrom
Pengzna:IoTV2/globalSinkPool
Sep 3, 2025
Merged

Use global sink executor pool for IoTV2#16163
jt2594838 merged 14 commits intoapache:masterfrom
Pengzna:IoTV2/globalSinkPool

Conversation

@Pengzna
Copy link
Collaborator

@Pengzna Pengzna commented Aug 13, 2025

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).

彭俊植 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May this be directly configurable?

Copy link
Collaborator Author

@Pengzna Pengzna Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no need to configure this.

  1. users may not aware of this configuration and I think most users have no idea for configuring this.
  2. the soft limit of data region can be approximated, that we just set core size to this soft limit is fine.

@jt2594838 jt2594838 merged commit 68da097 into apache:master Sep 3, 2025
27 checks passed
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments