mirror of https://github.com/apache/nifi.git
NIFI-381: Ensure that we always properly account for number of active threads
This commit is contained in:
parent
ca23ad8eaa
commit
1af8c1e22a
|
@ -159,6 +159,7 @@ public class ContinuallyRunProcessorTask implements Callable<Boolean> {
|
|||
procNode.yield(schedulingAgent.getAdministrativeYieldDuration(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS);
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
if (batch) {
|
||||
rawSession.commit();
|
||||
}
|
||||
|
@ -174,8 +175,6 @@ public class ContinuallyRunProcessorTask implements Callable<Boolean> {
|
|||
}
|
||||
}
|
||||
|
||||
scheduleState.decrementActiveThreadCount();
|
||||
|
||||
try {
|
||||
final StandardFlowFileEvent procEvent = new StandardFlowFileEvent(procNode.getIdentifier());
|
||||
procEvent.setProcessingNanos(processingNanos);
|
||||
|
@ -185,6 +184,9 @@ public class ContinuallyRunProcessorTask implements Callable<Boolean> {
|
|||
logger.error("Unable to update FlowFileEvent Repository for {}; statistics may be inaccurate. Reason for failure: {}", procNode.getProcessor(), e.toString());
|
||||
logger.error("", e);
|
||||
}
|
||||
} finally {
|
||||
scheduleState.decrementActiveThreadCount();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue