diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java index 5fcd777ed947e..8a3008c8a1d21 100644 --- a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java +++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java @@ -295,7 +295,6 @@ public void run() { if (stats != null) { stats.incrSysExceptions(t); } - return; } finally { log.info("Closing instance"); close(); diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java index 4d3db4ccc7797..da19111cad7cb 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java @@ -139,14 +139,12 @@ public void startFunction(FunctionRuntimeInfo functionRuntimeInfo) { functionRuntimeInfo.setRuntimeSpawner(runtimeSpawner); runtimeSpawner.start(); - return; } catch (Exception ex) { FunctionDetails details = functionRuntimeInfo.getFunctionInstance() .getFunctionMetaData().getFunctionDetails(); log.info("{}/{}/{} Error starting function", details.getTenant(), details.getNamespace(), details.getName(), ex); functionRuntimeInfo.setStartupException(ex); - return; } } diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java index b0f41b0c80fc7..f643d1728e64d 100644 --- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java +++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionRuntimeManager.java @@ -230,7 +230,7 @@ public void initialize() { } } } catch (Exception e) { - log.error("Failed to initialize function runtime manager: ", e.getMessage(), e); + log.error("Failed to initialize function runtime manager: {}", e.getMessage(), e); throw new RuntimeException(e); } }