Dirk Arends created NIFI-12309:
----------------------------------

             Summary: InvokeScriptedProcessor sometimes does not reload script
                 Key: NIFI-12309
                 URL: https://issues.apache.org/jira/browse/NIFI-12309
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.22.0
            Reporter: Dirk Arends


In the file InvokeScriptedProcessor.java, the function reloadScript should 
return the opposite boolean value similar to the return value of the 
reloadScriptBody and reloadScriptFile functions in the same file:
{code:java}
- // return whether there were any issues loading the configured script
- return !results.isEmpty();
+ // return whether there were no issues loading the configured script
+ return results.isEmpty();{code}
[https://github.com/apache/nifi/blob/rel/nifi-1.23.2/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/script/InvokeScriptedProcessor.java#L464]

Going by the function's return value description, the function should return 
true if validationResults is empty:

"@return Whether the script was successfully reloaded"

We've been observing InvokeScriptedProcessors intermittently becoming invalid 
after a nifi restart which started after nifi version 1.18 where a related 
change *by @mattyb149* was made for NIFI-10387: 
[https://github.com/apache/nifi/pull/6325]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to