Closed drmingdrmer closed 1 year ago
Let me take a look
@drmingdrmer I have added a comment (https://github.com/datafuselabs/openraft/issues/677#issuecomment-1434334562) with what I think is the cause and the potential solution(s)
@minghuaw Got it! Thank you!
By replacing the default serde_bincode
with serde_json
, the hanging is gone. :heart:
I've used toy-rpc 0.8.6 in an example raft-based application that sends RPC between nodes with toy-rpc: https://github.com/datafuselabs/openraft/tree/4b555c83a023ce92922d98f045f09eea47cc254e
Everything goes very well until recently the RPC looks like blocking forever with:
It happens on my m1-mac 12.0.1;
The toy-rpc service is defined as the following: https://github.com/datafuselabs/openraft/blob/4b555c83a023ce92922d98f045f09eea47cc254e/examples/raft-kv-rocksdb/src/network/raft.rs#L16-L36
The tracing log shows that some messages are sent, but on the server side nothing is received: this log is not printed: https://github.com/datafuselabs/openraft/blob/4b555c83a023ce92922d98f045f09eea47cc254e/examples/raft-kv-rocksdb/src/network/raft.rs#L34
Is it an issue of toy-rpc or does the trace log show there could be something else going wrong?
This issue is found in:
Full log is attached here.
The tracing log when the blocking happens: