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 3E9696E200; Sat, 19 Jun 2021 14:01:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3E9696E200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1624100466; bh=XEu1RV4jr5pd8tzgNMTsDxCIMEKJAAGwF39aSeKriZk=; 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=sjFN+4+yYz09hn13nsRR/bKKCwsxPBrRWPghyXY62DaICd/vUDDSLM8fESBV2CUt3 jyY85tq1g1IVT6S2GmanybWGvYGEZBeugtp+D8OnXiiQCwgw6yAO43Ri2NmBveRrRo 0cbIMZEMXDKS0EnhyqWAcSN/KDYtoD0nSN8YtBes= Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 150E76E200 for ; Sat, 19 Jun 2021 14:01:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 150E76E200 Received: by mail-lf1-f53.google.com with SMTP id x24so21219632lfr.10 for ; Sat, 19 Jun 2021 04:01:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zDg19YPuUZod+oArS4oCa8+R55PA5bXgFWU/tL5vMz4=; b=L5Bn+DHep6UahyMtaKyO4JgGarns9BtlsbdhctCNSoMCnl799UTG4uKrhLsVb0aoB8 hGInBvz+WmEJI4ioxgJksejhaZ6AbO/ffgru8yNgZWw4U3QTdJhaSYTjvk58mjclwle4 6TKKrXAZ1/5Zo9M2w4mzNb2tjl+jJnNozmK0O5r/jeJ8/Hhy7lSthpIm6CwWXG6D6B66 BcIWprAPWiENoSAjC7wgnBpuJu+WpXhfkORm3Ct0UYcLNWsrScJLPsLP8gS/iz3HQ26d t4uTYBnnwhTDyzIL5pTVr70n1Kodd3Ip129te2P0Z4gmm6FXAgZp6zAunNfdLEP1VstI kWuA== X-Gm-Message-State: AOAM531zlhxVSIpe+7cTVz8bICgsn/1wgqS0SCMi1cmEsiE/s/5ciS2l KBVavmpj78xRqnJk17StUiq6lNL/hB4= X-Google-Smtp-Source: ABdhPJyB/frEiq5ruj2QXW5n2ANJ+/zMJeniS5reeaEuMXf0bPpUIlVtIq+t4bGIk9+nN0811JsYGw== X-Received: by 2002:ac2:5a11:: with SMTP id q17mr6878774lfn.60.1624100462887; Sat, 19 Jun 2021 04:01:02 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id z25sm1392999ljh.111.2021.06.19.04.01.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 04:01:01 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 782DA5A0020; Sat, 19 Jun 2021 14:01:00 +0300 (MSK) Date: Sat, 19 Jun 2021 14:01:00 +0300 To: Vladislav Shpilevoy Cc: tml Message-ID: References: <20210615135630.63465-1-gorcunov@gmail.com> <3a60e5a6-ef92-2e30-c5e8-7e0db70728ea@tarantool.org> <657ec5d8-63e1-25e2-171e-f2ef862ad844@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <657ec5d8-63e1-25e2-171e-f2ef862ad844@tarantool.org> User-Agent: Mutt/2.0.7 (2021-05-04) Subject: Re: [Tarantool-patches] [PATCH v9 0/1] applier: filter incoming synchro packets via transaction initiator 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: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Sat, Jun 19, 2021 at 12:58:03AM +0200, Vladislav Shpilevoy wrote: > >>> +box.cfg{replication = {require('fio').cwd() .. "/replica1.sock"}} > >> > >> 2. You don't need require('fio').cwd(). "unix/:./replica1.sock" works > >> just fine. The same for the other socket paths. > > > > Actually I too this from other examples since I suspect the use of > > absolute path might be critical for test run engine. It is not a problem > > to rename but other our tests do use this trick so meaybe we should stick > > with same approach? Again, I don't mind to use relative path if this > > won't cause problems in future. > > Cargo cult does not work. If something is done somewhere, it does not > mean it is correct. I see no issues with using the relative path. This has nothing to do with cargo cult, but rather with code unification. Either we start using relative paths everywhere, or we continue using abs paths. I'll change to relatve paths since you prefer. > Anyway if it won't work someday, your way won't either, because > cwd() is the same as "./". This is a bit more complex when mount namespaces step in, because open("cwd()" + "./entry") is not the same as open("./entry"). > >>> +-- Make the master to be RAFT leader, this drops connection > >>> +-- to the replica2. > >> > >> 3. There was no connection to replica2 from master. > >> > > > > I'll update the comment, thanks! (actually replica2 > > connected to the master initialy and this is full > > duplex connection which we close on reconfig, that's > > what I meant saying "dropping" connection, but this > > seems to be confusing). > > In the comment you said that this reconfig > drops the connection. But it still does not, even in > the updated definition above. > > You dropped this connection a few lines before this > comment. Vlad, here is an update, does it look better? I force pushed it into the same branch. --- diff --git a/test/replication/gh-6035-applier-filter.result b/test/replication/gh-6035-applier-filter.result index 7345a19f7..2fa593267 100644 --- a/test/replication/gh-6035-applier-filter.result +++ b/test/replication/gh-6035-applier-filter.result @@ -48,24 +48,23 @@ test_run:switch('replica2') | --- | - true | ... -box.cfg{replication = {require('fio').cwd() .. "/replica1.sock"}} +box.cfg({replication = {"unix/:./replica1.sock"}}) | --- | ... -- --- Make the master to be RAFT leader, this drops connection --- to the replica2. +-- Make the master to be RAFT leader. test_run:switch('master') | --- | - true | ... -box.cfg({ \ - replication = { \ - require('fio').cwd() .. "/master.sock", \ - require('fio').cwd() .. "/replica1.sock", \ - }, \ - replication_synchro_quorum = 2, \ - election_mode = 'manual', \ +box.cfg({ \ + replication = { \ + "unix/:./master.sock", \ + "unix/:./replica1.sock", \ + }, \ + replication_synchro_quorum = 2, \ + election_mode = 'manual', \ }) | --- | ... diff --git a/test/replication/gh-6035-applier-filter.test.lua b/test/replication/gh-6035-applier-filter.test.lua index beca5258e..716c84bb6 100644 --- a/test/replication/gh-6035-applier-filter.test.lua +++ b/test/replication/gh-6035-applier-filter.test.lua @@ -24,19 +24,18 @@ test_run:cmd('start server replica1') test_run:cmd('start server replica2') test_run:switch('replica2') -box.cfg{replication = {require('fio').cwd() .. "/replica1.sock"}} +box.cfg({replication = {"unix/:./replica1.sock"}}) -- --- Make the master to be RAFT leader, this drops connection --- to the replica2. +-- Make the master to be RAFT leader. test_run:switch('master') -box.cfg({ \ - replication = { \ - require('fio').cwd() .. "/master.sock", \ - require('fio').cwd() .. "/replica1.sock", \ - }, \ - replication_synchro_quorum = 2, \ - election_mode = 'manual', \ +box.cfg({ \ + replication = { \ + "unix/:./master.sock", \ + "unix/:./replica1.sock", \ + }, \ + replication_synchro_quorum = 2, \ + election_mode = 'manual', \ }) box.ctl.promote() diff --git a/test/replication/gh-6035-node.lua b/test/replication/gh-6035-node.lua index e3819471a..819a20332 100644 --- a/test/replication/gh-6035-node.lua +++ b/test/replication/gh-6035-node.lua @@ -1,8 +1,7 @@ -local SOCKET_DIR = require('fio').cwd() local INSTANCE_ID = string.match(arg[0], "gh%-6035%-(.+)%.lua") local function unix_socket(name) - return SOCKET_DIR .. "/" .. name .. '.sock'; + return "unix/:./" .. name .. '.sock'; end require('console').listen(os.getenv('ADMIN')) diff --git a/test/replication/suite.cfg b/test/replication/suite.cfg index 3b5cee75b..69f2f3511 100644 --- a/test/replication/suite.cfg +++ b/test/replication/suite.cfg @@ -50,9 +50,7 @@ "gh-6057-qsync-confirm-async-no-wal.test.lua": {}, "gh-6094-rs-uuid-mismatch.test.lua": {}, "gh-6127-election-join-new.test.lua": {}, - "gh-6035-applier-filter.test.lua": { - "memtx": {"engine": "memtx"} - }, + "gh-6035-applier-filter.test.lua": {}, "*": { "memtx": {"engine": "memtx"}, "vinyl": {"engine": "vinyl"}