AnujJain7 commented on pull request #2724:
URL: https://github.com/apache/nifi/pull/2724#issuecomment-631241948


   We are facing issue in PublishGCPubSub operator , some threads are going in 
hang state
   checking on thread dump get following error for those thread
   `{"stackTrace":"\"Timer-Driven Process Thread-50\" Id=8466 TIMED_WAITING  on 
null\n\tat java.lang.Thread.sleep(Native Method)\n\tat 
org.apache.nifi.processors.gcp.pubsub.PublishGCPubSub.onTrigger(PublishGCPubSub.java:166)\n\tat
 
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)\n\tat
 `
   
   Looking into code of PublishGCPubSub.java at line number 166
   
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/pubsub/PublishGCPubSub.java#L166
   
   there is use of Thread.sleep with condition that messageIdFuture.isDone, 
seems like an issue 
    why we need to sleep the thread when the task is completed ?
   _```
   while (messageIdFuture.isDone()) {
                           Thread.sleep(500L);
                       }
   ```_
   
   Looking forward to get response on this


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to