From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5A4472A44D for ; Wed, 10 Apr 2019 03:17:29 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UEcY8JMaJe2b for ; Wed, 10 Apr 2019 03:17:29 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 166092A3DC for ; Wed, 10 Apr 2019 03:17:28 -0400 (EDT) Date: Wed, 10 Apr 2019 10:17:26 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 3/5] test: process IO swim test events before protocol's ones Message-ID: <20190410071726.GD8268@chai> References: <79b08bc60bcebefba3333dc2874359769e6586c2.1554833062.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79b08bc60bcebefba3333dc2874359769e6586c2.1554833062.git.v.shpilevoy@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org * Vladislav Shpilevoy [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