You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by pv...@apache.org on 2021/03/09 07:52:42 UTC

[nifi] branch support/nifi-1.13 updated: NIFI-6518: If processor is scheduled to run on Primary Node Only, and 'this' node is not primary node, yield for the bored yield duration.

This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch support/nifi-1.13
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.13 by this push:
     new e54ef97  NIFI-6518: If processor is scheduled to run on Primary Node Only, and 'this' node is not primary node, yield for the bored yield duration.
e54ef97 is described below

commit e54ef97df1220b5cba2cd8f7ad1644b15bc173eb
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Mon Mar 8 16:54:30 2021 -0500

    NIFI-6518: If processor is scheduled to run on Primary Node Only, and 'this' node is not primary node, yield for the bored yield duration.
    
    Signed-off-by: Pierre Villard <pi...@gmail.com>
    
    This closes #4875.
---
 .../src/main/java/org/apache/nifi/controller/tasks/ConnectableTask.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ConnectableTask.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ConnectableTask.java
index 8fe3a59..9edd762 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ConnectableTask.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/tasks/ConnectableTask.java
@@ -164,7 +164,7 @@ public class ConnectableTask {
         // make sure that either we're not clustered or this processor runs on all nodes or that this is the primary node
         if (!isRunOnCluster(flowController)) {
             logger.debug("Will not trigger {} because this is not the primary node", connectable);
-            return InvocationResult.DO_NOT_YIELD;
+            return InvocationResult.yield("This node is not the primary node");
         }
 
         // Make sure processor has work to do.