rdhabalia commented on a change in pull request #2424: Support heartbeat 
function for worker
URL: https://github.com/apache/incubator-pulsar/pull/2424#discussion_r212406508
 
 

 ##########
 File path: 
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerConfig.java
 ##########
 @@ -143,7 +143,7 @@ public static WorkerConfig load(String yamlFile) throws 
IOException {
 
     public String getWorkerId() {
         if (StringUtils.isBlank(this.workerId)) {
-            this.workerId = getWorkerHostname();
+            this.workerId = String.format("%s-%s", this.getWorkerHostname(), 
this.getWorkerPort());
 
 Review comment:
   it was a bug actually, if multiple worker instances start on the same host 
but different port then it doesn't create unique workerId and it was resulting 
into incorrect assignment. Therefore, it is part of bug-fix also.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to