nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (NIFI-6701) PublishGCPPubSub does not send all messages
Date Tue, 02 Jun 2020 13:51:01 GMT

    [ https://issues.apache.org/jira/browse/NIFI-6701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123808#comment-17123808
] 

ASF subversion and git services commented on NIFI-6701:
-------------------------------------------------------

Commit 8162edfd9891159cc1636c4f496de911ee752b9c in nifi's branch refs/heads/MINIFI-422 from
Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8162edf ]

NIFI-6701 - Fix for PublishGCPPubSub


> PublishGCPPubSub does not send all messages
> -------------------------------------------
>
>                 Key: NIFI-6701
>                 URL: https://issues.apache.org/jira/browse/NIFI-6701
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.9.2
>            Reporter: Jake Dalli
>            Assignee: Pierre Villard
>            Priority: Major
>              Labels: easyfix
>             Fix For: 1.12.0
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> I have found an issue with the PublishGCPPubSub processor.  After implementing a number
of flows, I have realised that approximately 30% of messages are sporadically not sent to
Pubsub in spite of a 'Send Successful' response from the processor. 
>  
> Upon investigating the code on github  ([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|https://slack-redir.net/link?url=https%3A%2F%2Fgithub.com%2Fapache%2Fnifi%2Fblob%2Fmaster%2Fnifi-nar-bundles%2Fnifi-gcp-bundle%2Fnifi-gcp-processors%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fnifi%2Fprocessors%2Fgcp%2Fpubsub%2FPublishGCPubSub.java]),
I found the following issue:
>  # On line 163 we get the Future for the 'Publish message' action.
>  # On line 165 we have the following loop:
> {code:java}
> while (messageIdFuture.isDone()) { 
> Thread.sleep(500L); 
> }
> {code}
> This means that if the future isDone method returns, the thread sleeps. It is unclear
to me why this is the case and I believe this is a bag, in my opinion the processor should
sleep if the future is not done, thus the loop should read:
> {code:java}
> while(!messageIdFuture.isDone()){ ... }{code}
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message