Joe Witt created NIFI-11575:
-------------------------------

             Summary: When you terminate a component - it increases the thread 
pool size and does not restore it until restart
                 Key: NIFI-11575
                 URL: https://issues.apache.org/jira/browse/NIFI-11575
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Core Framework
    Affects Versions: 1.21.0, 2.0.0
            Reporter: Joe Witt
            Assignee: Mark Payne


Currently when you stop a component and then choose to terminate active threads 
we do this by expanding the core pool size by the number of currently running 
threads for that component.  So if you have a pool size of 10 as configured in 
the flow controller and you choose to terminate a processor that currently has 
5 running tasks the flow controller will now be updated to allow 15 threads.  
This happens only at runtime it doesn't change the config so the issue will 
resolve itself on restart.

Why we need to do this makes sense.  The stuck threads you wish to terminate 
may in fact never stop so these new threads replace those lost threads and work 
can continue.  And indeed termination in general is an 'in case of emergency 
break glass' operation.  But assuming termination works out we should return to 
the desired pool size.

This becomes even more important on a system that is already resource saturated 
where termination might be a necessary/helpful tool in reworking the live flow 
and as of now doing so actually increase the thread pool size which increases 
the amount of work that can be done in parallel thus making the situation 
harder.  Fixing this logic will help termination be useful without expanding 
the resource burden.



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

Reply via email to