fgerlits commented on code in PR #2313:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2313#discussion_r4682017587


##########
extensions/opc/src/OPCCommon.cpp:
##########
@@ -789,7 +789,7 @@ void Client::eventNotificationCallback(UA_Client* 
/*client*/, UA_UInt32 /*sub_id
         client->logger_->log_warn("Failed to convert event field '{}' to 
string, skipping field: {}", name, ex.what());
       }
     }
-    client->pushEvent(std::move(event));
+    client->pending_events_.push_back(std::move(event));

Review Comment:
   It is true that max memory usage can be higher than before, but the increase 
is temporary and at most a few MB. The Open62541 server already has a 
`maxNotificationsPerPublish` limit (1000 by default), which effectively limits 
the size of `pending_events_`. The suggestion is valid, but I don't think 
fixing it is worth the extra complexity.
   
   If a human reads this and agrees with Copilot that we should limit the size 
of `pending_events_`, please reopen this and comment on it.



-- 
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]

Reply via email to