"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "3d335f833c8f3bbf2eae53d1f49e403498af5da3"
Unverified Commit 3ffe0c09 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[Dist] re-try to receive rpc ndarray msg (#4142)

parent 4a9be030
...@@ -291,14 +291,17 @@ rpc::RPCStatus SocketReceiver::Recv(rpc::RPCMessage* msg, int timeout) { ...@@ -291,14 +291,17 @@ rpc::RPCStatus SocketReceiver::Recv(rpc::RPCMessage* msg, int timeout) {
std::vector<void*> buffer_list(nonempty_ndarray_count); std::vector<void*> buffer_list(nonempty_ndarray_count);
for (int i = 0; i < nonempty_ndarray_count; ++i) { for (int i = 0; i < nonempty_ndarray_count; ++i) {
Message ndarray_data_msg; Message ndarray_data_msg;
status = RecvFrom(&ndarray_data_msg, send_id, timeout); // As meta message has been received, data message is always expected unless
if (status == QUEUE_EMPTY) { // connection is closed.
// As we cannot handle this timeout for now, let's treat it as fatal STATUS status;
// error. do {
LOG(FATAL) << "Timed out when trying to receive rpc ndarray data after " status = RecvFrom(&ndarray_data_msg, send_id, timeout);
<< timeout << " milliseconds."; if (status == QUEUE_EMPTY) {
return rpc::kRPCTimeOut; DLOG(WARNING)
} << "Timed out when trying to receive rpc ndarray data after "
<< timeout << " milliseconds.";
}
} while (status == QUEUE_EMPTY);
CHECK_EQ(status, REMOVE_SUCCESS); CHECK_EQ(status, REMOVE_SUCCESS);
buffer_list[i] = ndarray_data_msg.data; buffer_list[i] = ndarray_data_msg.data;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment