Sheel Chand created NIFI-15883:
----------------------------------
Summary: Wait/Notify Processing have a race condition while
updating the Cache
Key: NIFI-15883
URL: https://issues.apache.org/jira/browse/NIFI-15883
Project: Apache NiFi
Issue Type: Bug
Components: Core Framework
Affects Versions: 2.9.0, 2.1.0, 1.15.3
Reporter: Sheel Chand
Fix For: 2.10.0, 2.9.0, 1.15.3
Nifi Processor Wait calls the protocol.replace function without checking the
return value - true or false. The replace() method may fail if a Notify
processor has updated the counters since the last fetch() by the Wait
Processor. As a result some updates are lost specially in a high concurrency
case. If you have a counter to wait for a number of ACKS before releasing the
files, the counter keeps increasing because the decrements by the Wait
Processor get lost.
The same issue with the entry removal. The protocol.complete() method removes
the entry without going through the Cache Protocol Version 2. So, it may remove
an entry even if a Notify processor has updated counters since the last fetch().
The notify function in WaitNotifyPortocol.java does the right thing by retrying
multiple times if the replace() method returns false.
Wait Processor needs to be fixed to implement Cache Protocol Version 2 for
replace and complete() methods.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)