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

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


The following commit(s) were added to refs/heads/main by this push:
     new 79121a1  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.
79121a1 is described below

commit 79121a142ee2c0cf70ec3cd5dab180a23661602a
Author: Mark Payne <[email protected]>
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 <[email protected]>
    
    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 d3573c2..29741eb 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.

Reply via email to