You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/05/23 22:33:43 UTC

[GitHub] [nifi] markap14 commented on a change in pull request #4290: NIFI-6701: Fix Future execution handling

markap14 commented on a change in pull request #4290:
URL: https://github.com/apache/nifi/pull/4290#discussion_r429583312



##########
File path: nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/pubsub/PublishGCPubSub.java
##########
@@ -162,7 +162,7 @@ public void onTrigger(ProcessContext context, ProcessSession session) throws Pro
 
                     ApiFuture<String> messageIdFuture = publisher.publish(message);
 
-                    while (messageIdFuture.isDone()) {
+                    while (!messageIdFuture.isDone()) {

Review comment:
       @zenfenan is there a reason to have this loop at all? The next line calls `messageIdFuture.get()`, which is a blocking call. So we should just remove this entire loop, as it's adding up to a half-second delay for each FlowFile. Or am I missing something?




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