[tarantool-patches] Re: [PATCH 3/5] test: process IO swim test events before protocol's ones

Konstantin Osipov kostja at tarantool.org
Wed Apr 10 10:17:26 MSK 2019


* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/04/09 21:14]:
> Before that patch the swim test event loop worked like this: pop
> a new event, set the global watch to its deadline, process the
> event, repeat until the deadlines are the same. These events
> usually generate IO events, which are processed next. But after
> swim_quit() will be introduced, it is possible to insert new IO
> events before protocol's events like round steps and ack checks.
> 
> Because of that it would be impossible to process new IO events
> only, with timeout = 0, or with timeout > 0, but without changing
> the global clock.
> 
> For example, a typical test would try to call swim_quit() on a
> swim instance, and expect that it has sent all the quit messages
> without delays immediately. But before this patch it would be
> necessary to run at least one swim round to get to the IO
> processing.
> 
> The patch splits protocol's events and IO events processing logic
> into two functions and calls them explicitly in
> swim_wait_timeout() - the main function to check something in the
> swim tests.

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