Skip to content
Snippets Groups Projects
Commit 3bc7f4e6 authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

iproto: discard CALL/EVAL input on yield

Currently, a long polling request can stall all other connections,
because the input buffer can't be reclaimed until it is completed.
Funny thing is CALL/EVAL only needs input for a short time, to decode
arguments from msgpack and push them to stack, after that point the
input can be safely discarded.

So this patch makes tx_process_call() setup a trigger before executing
the CALL/EVAL request. The trigger is invoked on fiber yield. The
trigger's callback sends a message back to the iproto thread notifying
it that tx has processed the request input. Upon receiving such a
message, iproto discards the request input and resumes suspended
connections, if any.

Closes #946
parent d461caf3
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