marco polo created MINIFI-214:
---------------------------------

             Summary: Memory possibly lost by using new thread
                 Key: MINIFI-214
                 URL: https://issues.apache.org/jira/browse/MINIFI-214
             Project: Apache NiFi MiNiFi
          Issue Type: Sub-task
          Components: C++
            Reporter: marco polo


Several components ( the scheduling agents, and the provenance repository ) 
create a new thread. We should not be doing this. If the flow of events is such 
that all closures occur, this "possibly lost" isn't a given; however, we can't 
guarantee all operations will occur in the negative paths.

Further, it appears as though if a the agents are relying on closure from the 
flow controller to stop all threads. If we were to stop processing in a 
processing group as a result of a C2C operation ( for example ), the threads 
would be deleted from the list of known threads, but not stopped. Since they 
are detached, this could be a problem and allow the thread to continue in 
perpetuity. Depending on ulimit, this could cause complete failure. 

Finally, we should probably not detach threads and instead create 
std::packaged_tasks from which we can keep track of futures. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to