simperby
simperby copied to clipboard
Prevent DMS from sending rpc-fetch request to itself in `serve()`.
When DMS::serve()
is called, the associated dms spawns several tasks; Two of them are serve_fetch
and serve_rpc
. The problem arises when serve_fetch
tries to fetch messages from serve_rpc
. Upon receiving the rpc-fetch request, serve_rpc
tries to acquire a readonly lock of its associated dms, but it fails (I guess a lock for writing is already created somewhere). Therefore, the serve_rpc
task wait for the lock indefinitely.
Anyway, it is redundant for the serve()
process to send rpc-fetch request to its own dms. No matter where this bug(is it really a bug?) comes from, I will try to fix this behavior of self-fetching. That's the primary purpose of this issue.