Skip to content
Snippets Groups Projects
Commit 975e92e3 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

iproto: make sure throttled connections are woken up

If a message arrives when there is no output for the connection and the
IPROTO_MSG_MAX limit is hit, the input will never be processed unless
the other end writes more data to the socket.

To make sure a throttled connection will be woken up eventually when the
number of pending requests drops below IPROTO_MSG_MAX, let's link all
throttled connections in a list and wake the oldest element from it
whenever a messages is freed.

The issue was initially attempted to be fixed by commit 52b47951
("Don't stop connection if there is no pending requests") by allowing to
exceed the IPROTO_MSG_MAX limit. That commit, however, introduced the
possibility of a deadlock due to depleting the fiber pool, which was
"resolved" by commit 9492cddb ("iproto: fix IPROTO_MSG_MAX check") while
reintroducing the original issue.

Patch by Vladimir Davydov
parent 94da1913
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment