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
Loading
Please register or sign in to comment