Copilot commented on code in PR #15212:
URL: https://github.com/apache/iotdb/pull/15212#discussion_r2015951519
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipePluginInfo.java:
##########
@@ -352,14 +352,34 @@ public void processLoadSnapshot(final File snapshotDir)
throws IOException {
final File snapshotFile = new File(snapshotDir, SNAPSHOT_FILE_NAME);
if (!snapshotFile.exists() || !snapshotFile.isFile()) {
LOGGER.error(
- "Failed to load snapshot,snapshot file [{}] is not exist.",
+ "Failed to load snapshot, snapshot file [{}] is not exist.",
snapshotFile.getAbsolutePath());
return;
}
try (final FileInputStream fileInputStream = new
FileInputStream(snapshotFile)) {
pipePluginMetaKeeper.processLoadSnapshot(fileInputStream);
}
+
+ for (final PipePluginMeta pipePluginMeta :
pipePluginMetaKeeper.getAllPipePluginMeta()) {
+ final String pluginName = pipePluginMeta.getPluginName();
+ final String pluginDirPath =
pipePluginExecutableManager.getPluginsDirPath(pluginName);
+ final PipePluginClassLoader pipePluginClassLoader =
+ classLoaderManager.createPipePluginClassLoader(pluginDirPath);
+ try {
Review Comment:
Catching a generic Exception here may obscure specific issues during plugin
class loading. Consider catching more specific exceptions (e.g.,
ClassNotFoundException or related exceptions) to better handle different error
scenarios and improve debugging.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]