[tarantool-patches] Re: [PATCH 4/4] swim: do not rebuild packet meta multiple times
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Apr 18 21:34:31 MSK 2019
Pushed into the master.
On 18/04/2019 20:23, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/04/18 09:03]:
>> Before the patch there were 2 cases when an unchanged packet was
>> rebuilt partially on each send:
>>
>> - cached round message's meta section was rebuilt on each
>> EV_WRITE event in swim_scheduler_on_output() function;
>>
>> - broadcast message's meta section was rebuilt too even though
>> its content does not depend on a broadcast interface.
>>
>> The third case appears with indirect pings patch which aggravates
>> meta building business by routing and packet forwarding. When a
>> packet needs to be forwarded farther, its meta is built in a
>> special manner preserving the route before EV_WRITE appears, and
>> on_output should not touch that meta.
>>
>> This patch adds a check preventing unnecessary meta rebuilds.
>> Besides, the check and the meta building code are moved into a
>> dedicated function out of swim_scheduler_on_output() - it allows
>> to completely split logic of packing a message and sending it.
>> Separated logic helps a lot when indirect pings are introduced.
>>
>
> ok to push.
>
>
> --
> Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
> http://tarantool.io - www.twitter.com/kostja_osipov
>
More information about the Tarantool-patches
mailing list