Caideyipi commented on code in PR #13006:
URL: https://github.com/apache/iotdb/pull/13006#discussion_r1687998818
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipePluginInfo.java:
##########
@@ -231,15 +233,32 @@ public DataSet showPipePlugins() {
public JarResp getPipePluginJar(final GetPipePluginJarPlan
getPipePluginJarPlan) {
try {
final List<ByteBuffer> jarList = new ArrayList<>();
+ final PipePluginExecutableManager manager =
PipePluginExecutableManager.getInstance();
+
for (final String jarName : getPipePluginJarPlan.getJarNames()) {
String pluginName =
pipePluginMetaKeeper.getPluginNameByJarName(jarName);
if (pluginName == null) {
throw new PipeException(String.format("%s does not exist", jarName));
}
- jarList.add(
- ExecutableManager.transferToBytebuffer(
- PipePluginExecutableManager.getInstance()
- .getPluginInstallPath(pluginName, jarName)));
+
+ String jarPath = manager.getPluginInstallPathV2(pluginName, jarName);
+
+ boolean needFlush = !Files.exists(Paths.get(jarPath));
+ if (needFlush) {
Review Comment:
May use a better name than "flush".
--
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]