[ 
https://issues.apache.org/jira/browse/MINIFICPP-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16758265#comment-16758265
 ] 

Mr TheSegfault commented on MINIFICPP-728:
------------------------------------------

[~aboda] That's a great question. So I'm clear, what you are asking is if the 
connection is established in the setup phase of the RPG, why can't we keep that 
connection open?

 

The next question from NiFi's perspective: How long do we keep those 
connections open? From what I recall NiFi doesn't care if the connection is 
torn down or re-used; however, we don't know after we get that peer list if we 
have data, do we? The nanofi site to site is used differently, so it can and 
should probably re-use that connection, but I'm not sure we can ever have 
enough information in the setup of the RPG to know if we can or should keep the 
connection. Thus, I believe the choice was made long ago to tear down since 
it's less damaging than having many connections from MiNiFi open to NiFi that 
may not send data at all ( remember the send occurs in onTrigger – so timing of 
the yaml config controls when this executes)

 

Additionally, I've changed this from a bug to an improvement since if there is 
any reason to improve it, it is just an optimization. If for some reason this 
is a bug it can go into 0.6.0

> RawSiteToSite::getPeerList unnecessarily tears down connection after 
> successfully retrieving peer list
> ------------------------------------------------------------------------------------------------------
>
>                 Key: MINIFICPP-728
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-728
>             Project: NiFi MiNiFi C++
>          Issue Type: Improvement
>            Reporter: Arpad Boda
>            Assignee: Arpad Boda
>            Priority: Minor
>             Fix For: 0.7.0
>
>
> teardown call seems to be needless in sunny path, the connection could be 
> kept after retrieving peers.
> [~phrocker] what do you think?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to