adam-markovics commented on a change in pull request #1280:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1280#discussion_r831157243
##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -792,20 +792,40 @@ class C2AcknowledgeHandler : public ServerAwareHandler {
rapidjson::Document root;
root.Parse(req.data(), req.size());
if (root.IsObject() && root.HasMember("operationId")) {
- std::lock_guard<std::mutex> guard(mtx_);
+ std::lock_guard<std::mutex> guard(ack_operations_mtx_);
Review comment:
With locking two mutexes, you always have to be careful. Is it possible
to have another thread locking them in the reverse order than here? So, first
`apply_count_mtx_` and then `ack_operations_mtx_`? That could result in a
deadlock. It's possible by calling `isAcknowledged` first and `getApplyCount`
second, for example.
--
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]