| 1234 | } |
| 1235 | |
| 1236 | void RdmaTensorResponse::SendErrorStatus(const Status& status) { |
| 1237 | RdmaMessage rm; |
| 1238 | rm.type_ = RDMA_MESSAGE_ERROR_STATUS; |
| 1239 | rm.name_size_ = rm_.name_.size(); |
| 1240 | rm.name_ = rm_.name_; |
| 1241 | rm.step_id_ = rm_.step_id_; |
| 1242 | rm.request_index_ = rm_.request_index_; |
| 1243 | rm.status_ = status; |
| 1244 | LOG(ERROR) << "Step 0x" << std::hex << rm.step_id_ << std::dec |
| 1245 | << ": Sending RDMA_MESSAGE_ERROR_STATUS #" << rm.request_index_ |
| 1246 | << ": " << rm.name_ << ". Status: " << status.ToString(); |
| 1247 | |
| 1248 | string message = RdmaMessage::CreateMessage(rm); |
| 1249 | channel_->tx_message_buffer_->EnqueueItem(message); |
| 1250 | channel_->tx_message_buffer_->SendNextItem(); |
| 1251 | |
| 1252 | // Destroy the response. |
| 1253 | Destroy(); |
| 1254 | } |
| 1255 | |
| 1256 | void RdmaTensorResponse::Destroy() { |
| 1257 | if (src_buffer_ != nullptr) { |
nothing calls this directly
no test coverage detected