[
https://issues.apache.org/jira/browse/MINIFICPP-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16171761#comment-16171761
]
ASF GitHub Bot commented on MINIFICPP-36:
-----------------------------------------
Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/134#discussion_r139702066
--- Diff: libminifi/include/core/Processor.h ---
@@ -153,7 +154,8 @@ class Processor : public Connectable, public
ConfigurableComponent, public std::
}
// decrement Active Task Counts
void decrementActiveTask(void) {
- active_tasks_--;
+ if (active_tasks_ > 0)
+ active_tasks_--;
--- End diff --
Since the input ( stop command for example ) is user provided, this is only
a protection. Decrement only occurs when an exception occurs during on trigger.
If this happens just after unschedule occurs ( and the active tasks is set to 0
) then we could arrive at -1. I didn't want to impose additional locking.
Not ideal, and this can be solved more elegantly by not decrementing active
tasks during an exception since the number isn't currently important ( just
that tasks > 0 )...but I did not want to make additional changes here.
> Begin building controlling API to facilitate control of agents
> --------------------------------------------------------------
>
> Key: MINIFICPP-36
> URL: https://issues.apache.org/jira/browse/MINIFICPP-36
> Project: NiFi MiNiFi C++
> Issue Type: New Feature
> Reporter: marco polo
> Assignee: marco polo
> Priority: Critical
> Labels: Durability, Reliability, Statistics
>
> Begin building the controlling API in MiNiFi C++. This API will evolve and
> likely have public and private elements. As development progresses we may
> want more capabilities.
> What I want to create as a straw man will be basic control and metrics
> gathering
> -- Start
> -- Stop
> -- Pause
> -- Gather metrics
> ** Throughput of of flow components
> ** Execution time ( run time minus sleep time )
> ** Memory consumption
> -- Drain repositories
> -- Switch repository types.
> Better employ update listener within this controlling API
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)