This is an automated email from the ASF dual-hosted git repository.
isapego pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new a4011c96040 IGNITE-27351 C++ Client: Fix compute job deadlock (#7234)
a4011c96040 is described below
commit a4011c96040ee3bd2a76f02f1d66f00a2ff4152e
Author: Ed Rakhmankulov <[email protected]>
AuthorDate: Mon Dec 15 17:09:49 2025 +0300
IGNITE-27351 C++ Client: Fix compute job deadlock (#7234)
---
modules/platforms/cpp/ignite/client/detail/node_connection.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/platforms/cpp/ignite/client/detail/node_connection.cpp
b/modules/platforms/cpp/ignite/client/detail/node_connection.cpp
index 072cb329500..6881ee16a68 100644
--- a/modules/platforms/cpp/ignite/client/detail/node_connection.cpp
+++ b/modules/platforms/cpp/ignite/client/detail/node_connection.cpp
@@ -86,10 +86,12 @@ void node_connection::process_message(bytes_view msg) {
auto pos = reader.position();
bytes_view data{msg.data() + pos, msg.size() - pos};
- { // Locking scope
+ std::shared_ptr<response_handler> handler{};
+ {
std::lock_guard<std::recursive_mutex> lock(m_request_handlers_mutex);
- auto handler = find_handler_unsafe(req_id);
+ handler = find_handler_unsafe(req_id);
+ }
if (!handler) {
m_logger->log_error("Missing handler for request with id=" +
std::to_string(req_id));
return;
@@ -106,6 +108,8 @@ void node_connection::process_message(bytes_view msg) {
m_logger->log_error("Uncaught user callback exception: " +
result.error().what_str());
}
+ {
+ std::lock_guard<std::recursive_mutex> lock(m_request_handlers_mutex);
if (handler->is_handling_complete()) {
m_request_handlers.erase(req_id);
}