adamdebreceni commented on code in PR #1038:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1038#discussion_r923320804
##########
libminifi/src/Connection.cpp:
##########
@@ -169,8 +182,14 @@ void Connection::drain(bool delete_permanently) {
std::lock_guard<std::mutex> lock(mutex_);
while (!queue_.empty()) {
- std::shared_ptr<core::FlowFile> item = queue_.pop();
- logger_->log_debug("Delete flow file UUID %s from connection %s, because
it expired", item->getUUIDStr(), name_);
+ // TODO(adebreceni): we don't actually use the whole flow file
+ // there could be a more optimal solution without triggering a swap-in
Review Comment:
the content in this `drain` method is not accessed, the actual FlowFile
properties (e.g. ResourceClaim) are only accessed if `delete_permanently` is
`true`, so in theory we should be good with a `FlowFileQueue::clear` method,
and only go through (and possibly swap in) FlowFiles when we need to access
some properties (for deleting resources from the ContentRepo)
##########
libminifi/src/Connection.cpp:
##########
@@ -169,8 +182,14 @@ void Connection::drain(bool delete_permanently) {
std::lock_guard<std::mutex> lock(mutex_);
while (!queue_.empty()) {
- std::shared_ptr<core::FlowFile> item = queue_.pop();
- logger_->log_debug("Delete flow file UUID %s from connection %s, because
it expired", item->getUUIDStr(), name_);
+ // TODO(adebreceni): we don't actually use the whole flow file
+ // there could be a more optimal solution without triggering a swap-in
Review Comment:
added `FlowFileQueue::clear`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]