planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
511 stars 144 forks source link

`NetMQTransport` queue clogging due to insufficient number of workers #1688

Closed greymistcube closed 1 year ago

greymistcube commented 2 years ago

As an ITransport interface, call to each of its method with timeout specified should be expected fail after the given amount of time period. However, due to its internal implementation, timeout is only considered when NetMQ actually attempts to process a given request. This would not be much of a problem if a Message gets processed by NetMQ near immediately after being enqueued, but with insufficient number of workers, which would depend on how lively the network currently is, this completely breaks the transport's behavior, and hence, also the Swarm<T>. As the number of workers determine the throughput of a NetMQTransport, there should be a better fail-safe mechanism to discard "stale" enqueued requests instead of trying to process every call to ITransport's method.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.