Skip to content
Snippets Groups Projects
Commit e66b8f07 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Konstantin Osipov
Browse files

iproto: decouple input buffer from output buffer

Output buffers are now rotated independently of input buffers. The
rotation is done by the tx thread according to the following rules:

 - If both buffers are empty, choose any one.
 - If neither of buffers is empty, write to the current one.
 - If one of the buffers is empty while the other is not, choose
   the empty one (rotate).

The output buffer is modified (rotated, written, reset) exclusively by
the tx thread. The iproto thread just flushes its content to the socket.
To propagate the output buffer state (iproto flush position and tx write
position) between the two threads, we pass it in iproto_msg::wpos.

The patch was originally written by @kostja. I just rebased it, fixed
a couple of bugs, and added some comments.

Note, it updates the tarantool/small version to bring obuf_svp_reset().

Needed for #946
parent 4de8b4cb
Loading
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