Skip to content

Commit da250b8

Browse files
authored
Skip broken pipe plugins on startup and snapshot load (#17470)
- PipeAgentLauncher: catch Throwable per plugin so registration errors do not stop startup - PipePluginInfo: catch Throwable when loading plugin classes from snapshot; continue with remaining plugins Made-with: Cursor
1 parent b8756a8 commit da250b8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipePluginInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,14 @@ public void processLoadSnapshot(final File snapshotDir) throws IOException {
413413
pipePluginMetaKeeper.addPipePluginVisibility(
414414
pluginName, VisibilityUtils.calculateFromPluginClass(pluginClass));
415415
classLoaderManager.addPluginAndClassLoader(pluginName, pipePluginClassLoader);
416-
} catch (final Exception e) {
416+
} catch (final Throwable e) {
417417
try {
418418
pipePluginClassLoader.close();
419419
} catch (final Exception ignored) {
420420
}
421421
throw e;
422422
}
423-
} catch (final Exception e) {
423+
} catch (final Throwable e) {
424424
LOGGER.warn(
425425
"Failed to load plugin class for plugin [{}] when loading snapshot [{}] ",
426426
pluginName,

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/runtime/PipeAgentLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static synchronized void launchPipePluginAgent(
9090
}
9191
PipeDataNodeAgent.plugin().doRegister(meta);
9292
}
93-
} catch (Exception e) {
93+
} catch (Throwable e) {
9494
// Ignore the pipe plugin errors and continue to start
9595
LOGGER.warn("Failure when register pipe plugins, will ignore.", e);
9696
}

0 commit comments

Comments
 (0)