FrederikP commented on issue #3500: NIFI-6322: Reuse evaluator stored in 
CompiledExpression when creating a query.
URL: https://github.com/apache/nifi/pull/3500#issuecomment-499038896
 
 
   This PR is not thread safe!
   So it definitely should not be merged as is. Introducing 
locks/synchronization in all stateful evaluators is probably not a good idea 
either. Not from a code-cleanliness standpoint nor concerning performance. 
Somehow I forgot to think about concurrency in this regard.
   
   I think the last part from my last comment is still a pretty good idea. It 
removes state from the evaluators and moves it to a context. A context will 
exist per thread, solving the thread safety issue as well.
   
   I will have a look at what changes would be needed and probably open up a 
new PR if I have something useful for the sake of clarity.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to