From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id E0F086E454; Wed, 9 Feb 2022 12:11:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E0F086E454 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1644397866; bh=GNHwfdaWVFe84cu/WkUZxt4Gbqv6MmafUqLJWAy9vt4=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=o+3D6n1xMHM7/mSDJMg5sbQkPYqdvJmrLQ3FtEUzqAVnJCSC5XmzZu7o4BlKNMJEV dNtCqlAic3J/EAjRj8dvak8nKPZyNgu81b0iqanuwZKB8RqbPX/Sm/ZfwzwpCb7u+B aCEGxdju5j6UpfKuCWa6/RGrdyJ0uy3ojNP9Ouew= Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id DD2076E454 for ; Wed, 9 Feb 2022 12:11:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DD2076E454 Received: by smtp49.i.mail.ru with esmtpa (envelope-from ) id 1nHj0B-0008Sk-C7; Wed, 09 Feb 2022 12:11:03 +0300 Message-ID: <07721603-350b-ff70-f96e-ae3ca593a843@tarantool.org> Date: Wed, 9 Feb 2022 12:11:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 To: Cyrill Gorcunov , Vladislav Shpilevoy Cc: tml References: <20220131215554.1367429-1-gorcunov@gmail.com> <20220131215554.1367429-4-gorcunov@gmail.com> Content-Language: en-US In-Reply-To: <20220131215554.1367429-4-gorcunov@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9B74B50284A7C1A0BDB3817FC5E3D06AF2B7372310051E825182A05F53808504030F9CC2889EDA72B085E7321CFF94FA9F948312040236FEEFAB03FE5489C1149 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72E4E5201E1C2E308EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378BCFB34D7DDF138E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D862D9B547F76A49FC353F808A323542E2117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F6FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 0D63561A33F958A5D163C574EEE6F3596F4EC0A0376978FEF2981E32E5155F37D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75E834DF3A3FCB6238410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D344F2126FF337FA6515F7E2812BE8B412385FC5CF65447B04AD1785122613994E76251CA2D5BA40A0B1D7E09C32AA3244C8E2D9F12E9785C565779BF68B08BF684F94338140B71B8EEFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojkCH2JBCxyk0PIN425DrnQw== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A446908E1924744442D0477EA5C928E6E5A62EBA3DB1E64D0E04424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BCB0DAF586E7D11B3E67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [RFC v29 3/3] test: add gh-6036-qsync-order test X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 01.02.2022 00:55, Cyrill Gorcunov пишет: > To test that promotion requests are handled only when appropriate > write to WAL completes, because we update memory data before the > write finishes. > > Part-of #6036 > > Signed-off-by: Cyrill Gorcunov > --- > .../gh_6036_qsync_order_test.lua | 137 ++++++++++++++++++ > test/replication-luatest/suite.ini | 1 + > 2 files changed, 138 insertions(+) > create mode 100644 test/replication-luatest/gh_6036_qsync_order_test.lua > > diff --git a/test/replication-luatest/gh_6036_qsync_order_test.lua b/test/replication-luatest/gh_6036_qsync_order_test.lua > new file mode 100644 > index 000000000..4c0059764 > --- /dev/null > +++ b/test/replication-luatest/gh_6036_qsync_order_test.lua > @@ -0,0 +1,137 @@ > +local t = require('luatest') > +local cluster = require('test.luatest_helpers.cluster') > +local asserts = require('test.luatest_helpers.asserts') > +local helpers = require('test.luatest_helpers') > +local log = require('log') > + > +local g = t.group('gh-6036', {{engine = 'memtx'}, {engine = 'vinyl'}}) You don't need to test engines here. You always create a memtx space anyway. > + > +g.before_each(function(cg) > + pcall(log.cfg, {level = 6}) You don't use log on the default instance. Why do you need that? Does it help luatest output somehow? > + > + local engine = cg.params.engine > + > + cg.cluster = cluster:new({}) > + Otherwise the test looks fine. Congratulations on writing your first luatest-test! Now on the promote/demote test. It should be fairly easy to implement. You only need 2 servers with election mode off and synchro quorum = 1, and a sync space. 1. promote server1 2. wait until the promotion is replicated 3. initiate wal delay on server2 4. issue box.ctl.promote() on server2 (it will block on box_issue_promote()) 5. while server2 is blocked on writing a promote, do insert{1} on server1 6. wait for replication to server2 (wal is blocked, so rely on ERRINJ_WAL_WRITE_COUNT) 7. unblock wal on server2 8. make sure insert{1} wasn't applied on server2. Speaking of the demote test. Demotion only works on the queue owner, so no one should be able to write obsolete data during the DEMOTE wal write. I  can't think of a test here and I think we may leave it untested.