Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v9 0/1] applier: filter incoming synchro packets via transaction initiator
Date: Sat, 19 Jun 2021 14:01:00 +0300
Message-ID: <YM3ObFYl7UOYQiRo@grain> (raw)
In-Reply-To: <657ec5d8-63e1-25e2-171e-f2ef862ad844@tarantool.org>

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"}

  reply	other threads:[~2021-06-19 11:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 13:56 Cyrill Gorcunov via Tarantool-patches
2021-06-15 13:56 ` [Tarantool-patches] [PATCH v9 1/1] " Cyrill Gorcunov via Tarantool-patches
2021-06-15 14:26   ` Serge Petrenko via Tarantool-patches
2021-06-15 17:02     ` Cyrill Gorcunov via Tarantool-patches
2021-06-15 18:08       ` Cyrill Gorcunov via Tarantool-patches
2021-06-16  8:31         ` Serge Petrenko via Tarantool-patches
2021-06-16  8:43           ` Cyrill Gorcunov via Tarantool-patches
2021-06-16  8:16       ` Serge Petrenko via Tarantool-patches
2021-06-18 21:49 ` [Tarantool-patches] [PATCH v9 0/1] " Vladislav Shpilevoy via Tarantool-patches
2021-06-18 22:16   ` Cyrill Gorcunov via Tarantool-patches
2021-06-18 22:58     ` Vladislav Shpilevoy via Tarantool-patches
2021-06-19 11:01       ` Cyrill Gorcunov via Tarantool-patches [this message]
2021-06-20 14:50         ` Vladislav Shpilevoy via Tarantool-patches
2021-06-20 17:17           ` Cyrill Gorcunov via Tarantool-patches
2021-06-21 21:06 ` Vladislav Shpilevoy via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YM3ObFYl7UOYQiRo@grain \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=v.shpilevoy@tarantool.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Tarantool development patches archive

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lists.tarantool.org/tarantool-patches/0 tarantool-patches/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 tarantool-patches tarantool-patches/ https://lists.tarantool.org/tarantool-patches \
		tarantool-patches@dev.tarantool.org.
	public-inbox-index tarantool-patches

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git