You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/07/14 06:52:21 UTC

[GitHub] [pulsar] jerrypeng opened a new pull request #7528: Fix: function BC issue introduced in 2.6

jerrypeng opened a new pull request #7528:
URL: https://github.com/apache/pulsar/pull/7528


   
   
   ### Motivation
   
   There was a backwards compatibility breakage introduced in:
   
   https://github.com/apache/pulsar/pull/5985
   
   If running function workers separately from brokers, updating workers and brokers independently from 2.5 to 2.6 will cause the following error:
   
   `java.lang.NullPointerException: null\n\tat java.net.URI$Parser.parse(URI.java:3104) ~[?:?]\n\tat java.net.URI.<init>(URI.java:600) ~[?:?]\n\tat java.net.URI.create(URI.java:881) ~[?:?]\n\tat org.apache.pulsar.functions.worker.WorkerUtils.initializeDlogNamespace(WorkerUtils.java:160) ~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]\n\tat org.apache.pulsar.functions.worker.Worker.initialize(Worker.java:155) ~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]\n\tat org.apache.pulsar.functions.worker.Worker.start(Worker.java:69) ~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]\n\tat org.apache.pulsar.functions.worker.FunctionWorkerStarter.main(FunctionWorkerStarter.java:67) [org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]\n`
   
   This is because a 2.5 broker will response will have "bookkeeperMetadataServiceUri" and the admin client will return the field as null:
   
   `InternalConfigurationData{zookeeperServers=zookeeper-dev-0.zookeeper-dev:2181,zookeeper-dev-1.zookeeper-dev:2181,zookeeper-dev-2.zookeeper-dev:2181, configurationStoreServers=zookeeper-dev-0.zookeeper-dev:2181,zookeeper-dev-1.zookeeper-dev:2181,zookeeper-dev-2.zookeeper-dev:2181, ledgersRootPath=/ledgers, bookkeeperMetadataServiceUri=null, stateStorageServiceUrl=null}`
   
   Thus causing the NPE
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] jerrypeng merged pull request #7528: Fix: function BC issue introduced in 2.6

Posted by GitBox <gi...@apache.org>.
jerrypeng merged pull request #7528:
URL: https://github.com/apache/pulsar/pull/7528


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #7528: Fix: function BC issue introduced in 2.6

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #7528:
URL: https://github.com/apache/pulsar/pull/7528#discussion_r454518289



##########
File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionWorkerStarter.java
##########
@@ -66,11 +66,12 @@ public static void main(String[] args) throws Exception {
         try {
             worker.start();
         } catch (Throwable th) {
+            log.error("Encountered error in function worker.", th);
             worker.stop();
             System.exit(-1);

Review comment:
       System.exit() is not always guaranteed to take the process down (eg: hanging threads). Use `Runtime.halt()` instead




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org