Fix a bug with session id in on_disconnect() trigger.
https://bugs.launchpad.net/tarantool/+bug/1160789 When multiple sessions get disconnected at the same time, the same fiber is running all disconnect triggers. This fiber's sid was not changed between trigger invocations, and on_disconnect() triggrer of the next disconnected session would see not its own session id in box.session.id(), but the previous session's session id. The fix is to correctly set box.session.id() before handling any iproto request. In on_connect() request, sid is 0, but soon it is reset in session_create(). No test case since the bug requires that there is a full libev queue, so that multiple on_disconnect() triggers fire in the same loop.
Loading
Please register or sign in to comment