Github user patricker commented on the issue:
https://github.com/apache/nifi/pull/3131
@markap14 I was worried about the same thing, which is why the `if`
statement is structured as it is. First, we do the standard check on
`isActiveQueueEmpty`. This happens in the code now as you mentioned, and right
now if this passes we create a writelock update the queue and call the
processor.
All my change does is add one additional check, but only if the queue is
not empty. So as far as I can tell, I'm locking one extra time for a queue that
is already going to get locked, but not locking any queues that would not
already get locked. Also, because I'm updating the queue during my check, when
the processor does get called the lock should not last as long as it would
otherwise, as there is less work to do. So overall lock time should be affected
only minimally. Thoughts?
---