Copilot commented on code in PR #2313:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2313#discussion_r4681347902
##########
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:
The staging buffer bypasses “Max size of message queue” until
`UA_Client_run_iterate()` returns. A large burst can therefore retain far more
events than configured, and `clear()` keeps the vector's peak capacity. Bound
staging as events arrive, retain the newest entries, and synchronize drop
accounting while preserving atomic publication.
--
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]