phrocker commented on issue #637: MINIFICPP-1020 - PutFile fails to create empty files URL: https://github.com/apache/nifi-minifi-cpp/pull/637#issuecomment-526534891 > @phrocker : the approach you suggest seems to be valid as well, although following that would require way more changes. As first examples the current implementation GenerateFlowFile and SiteToSiteClient::receiveFlowFiles doesn't follow this, both create the flowfile without clain in case the content size is zero. > > These could be changed as well, but my concern with this is some edgecases: you are allowed to route flowfiles from a failure relationship to PutFile. In these cases a lot of processors we have (opencv, the current implementation of FetchOPC, etc) don't create claim, but in my opinion this should still work. PutFile should only route to failure in case of IO issues (where the actual write or file creation cannot be performed). > > The NiFi approach is something I like, however following that would mean enforcing having a claim for all the flowfiles we have, and the current codebase is far from that. I suspect deser of FFM is creating a claim even when there is no data or claim to data -- I can see this causing confusion in how it would/should work. I'll dive further into that at some point today and get back to you; however, I was focused more on the GenerateFlowFile case. I'll also dive further into that PR to get a better understanding of whether that PR encapsulates the issue.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services