diff --git a/cpp/src/request.cpp b/cpp/src/request.cpp index f2453b17..e3b932d3 100644 --- a/cpp/src/request.cpp +++ b/cpp/src/request.cpp @@ -162,20 +162,14 @@ void Request::setStatus(ucs_status_t status) if (_endpoint != nullptr) _endpoint->removeInflightRequest(this); _worker->removeInflightRequest(this); - if (_status == UCS_INPROGRESS) { - // If the status is not `UCS_INPROGRESS`, the derived class has already set the - // status, a truncated message for example. - _status.store(status); - } - - ucs_status_t s = _status; - ucxx_trace_req_f(_ownerString.c_str(), _request, _operationName.c_str(), "callback called with status %d (%s)", - s, - ucs_status_string(s)); + status, + ucs_status_string(status)); + + _status.store(status); if (_enablePythonFuture) { auto future = std::static_pointer_cast(_future); diff --git a/cpp/src/request_stream.cpp b/cpp/src/request_stream.cpp index c93b447d..612aa927 100644 --- a/cpp/src/request_stream.cpp +++ b/cpp/src/request_stream.cpp @@ -92,8 +92,7 @@ void RequestStream::populateDelayedSubmission() void RequestStream::callback(void* request, ucs_status_t status, size_t length) { - status = length == _length ? status : UCS_ERR_MESSAGE_TRUNCATED; - _status = status; + status = length == _length ? status : UCS_ERR_MESSAGE_TRUNCATED; if (status == UCS_ERR_MESSAGE_TRUNCATED) { const char* fmt = "length mismatch: %llu (got) != %llu (expected)"; diff --git a/cpp/src/request_tag.cpp b/cpp/src/request_tag.cpp index b6a4cf5e..dddf9d4f 100644 --- a/cpp/src/request_tag.cpp +++ b/cpp/src/request_tag.cpp @@ -70,8 +70,6 @@ void RequestTag::callback(void* request, ucs_status_t status, const ucp_tag_recv std::snprintf(_status_msg.data(), _status_msg.size(), fmt, info->length, _length); } - _status = status; - Request::callback(request, status); }