This is an automated email from the ASF dual-hosted git repository.
jiangtian 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 278b05b1dc3 Pipe: Use async launch to avoid blocking datanode start
(#17315)
278b05b1dc3 is described below
commit 278b05b1dc3f564c095c43b181ac279b64dc881d
Author: Caideyipi <[email protected]>
AuthorDate: Thu Mar 19 12:18:25 2026 +0800
Pipe: Use async launch to avoid blocking datanode start (#17315)
* logger
* async
---
.../org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java | 2 +-
.../apache/iotdb/db/pipe/agent/runtime/PipeDataNodeRuntimeAgent.java | 3 +--
.../commons/pipe/agent/runtime/AbstractPipePeriodicalJobExecutor.java | 4 ++++
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java
index 77f2b143966..1e1d3388f75 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java
@@ -161,7 +161,7 @@ class PipeAgentLauncher {
ConfigNodeClientManager.getInstance().borrowClient(ConfigNodeInfo.CONFIG_REGION_ID))
{
final TGetAllPipeInfoResp getAllPipeInfoResp =
configNodeClient.getAllPipeInfo();
if (getAllPipeInfoResp.getStatus().getCode() !=
TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
- throw new StartupException("Failed to get pipe task meta from config
node.");
+ LOGGER.warn("Failed to get pipe metas, will be synced by configNode
later...");
}
PipeDataNodeAgent.task()
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeDataNodeRuntimeAgent.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeDataNodeRuntimeAgent.java
index 9eeaf19035f..8f75b7b1885 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeDataNodeRuntimeAgent.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeDataNodeRuntimeAgent.java
@@ -108,9 +108,8 @@ public class PipeDataNodeRuntimeAgent implements IService {
@Override
public synchronized void start() throws StartupException {
PipeConfig.getInstance().printAllConfigs();
- PipeAgentLauncher.launchPipeTaskAgent();
-
pipePeriodicalJobExecutor.start();
+
pipePeriodicalJobExecutor.runDirectly(PipeAgentLauncher::launchPipeTaskAgent);
if (PipeConfig.getInstance().getPipeEventReferenceTrackingEnabled()) {
pipePeriodicalPhantomReferenceCleaner.start();
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/runtime/AbstractPipePeriodicalJobExecutor.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/runtime/AbstractPipePeriodicalJobExecutor.java
index c6e24b5f475..08b65d103ee 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/runtime/AbstractPipePeriodicalJobExecutor.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/runtime/AbstractPipePeriodicalJobExecutor.java
@@ -110,6 +110,10 @@ public abstract class AbstractPipePeriodicalJobExecutor {
}
}
+ public void runDirectly(final Runnable command) {
+ executorService.execute(command);
+ }
+
@TestOnly
public void clear() {
periodicalJobs.clear();