From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>, gorcunov@gmail.com
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 6/7] replication: tolerate synchro rollback during final join
Date: Sat, 27 Mar 2021 22:23:46 +0300 [thread overview]
Message-ID: <d4a0511e-2af3-7a9a-8c67-718e6e6e71f3@tarantool.org> (raw)
In-Reply-To: <566bcb93-7123-3c59-f33d-0dac49592b88@tarantool.org>
26.03.2021 23:49, Vladislav Shpilevoy пишет:
> Thanks for working on this!
>
>> diff --git a/test/replication/gh-5566-final-join-synchro.result b/test/replication/gh-5566-final-join-synchro.result
>> new file mode 100644
>> index 000000000..32749bf12
>> --- /dev/null
>> +++ b/test/replication/gh-5566-final-join-synchro.result
>> @@ -0,0 +1,139 @@
>> +-- test-run result file version 2
>> +test_run = require('test_run').new()
>> + | ---
>> + | ...
>> +
>> +--
>> +-- gh-5566 replica tolerates synchronous transactions in final join stream.
>> +--
>> +_ = box.schema.space.create('sync', {is_sync=true})
>> + | ---
>> + | ...
>> +_ = box.space.sync:create_index('pk')
>> + | ---
>> + | ...
>> +
>> +box.schema.user.grant('guest', 'replication')
>> + | ---
>> + | ...
>> +box.schema.user.grant('guest', 'write', 'space', 'sync')
>> + | ---
>> + | ...
>> +
>> +-- Part 1. Make sure a joining instance tolerates synchronous rows in final join
>> +-- stream.
>> +trig = function()\
>> + box.space.sync:replace{1}\
>> +end
> You might need to increase the synchro timeout because the default can
> be flaky.
I think it's fine, since quorum is 1.
Do you think we can wait for a WAL write for more than 5 seconds?
Anyway, let's change it to a bigger value while we're at it.
I've also changed wait_log's timeout to 60 seconds:
==========================
diff --git a/test/replication/gh-5566-final-join-synchro.result
b/test/replication/gh-5566-final-join-synchro.result
index 32749bf12..a09882ba6 100644
--- a/test/replication/gh-5566-final-join-synchro.result
+++ b/test/replication/gh-5566-final-join-synchro.result
@@ -35,7 +35,10 @@ _ = box.space._cluster:on_replace(trig)
orig_synchro_quorum = box.cfg.replication_synchro_quorum
| ---
| ...
-box.cfg{replication_synchro_quorum=1}
+orig_synchro_timeout = box.cfg.replication_synchro_timeout
+ | ---
+ | ...
+box.cfg{replication_synchro_quorum=1, replication_synchro_timeout=60}
| ---
| ...
@@ -73,9 +76,6 @@ test_run:cmd('delete server replica')
-- Part 2. Make sure master aborts final join if insert to _cluster is
rolled
-- back and replica is capable of retrying it.
-orig_synchro_timeout = box.cfg.replication_synchro_timeout
- | ---
- | ...
-- Make the trigger we used above fail with no quorum.
box.cfg{replication_synchro_quorum=2, replication_synchro_timeout=0.01}
| ---
@@ -91,7 +91,7 @@ test_run:cmd('start server replica with wait=False')
| - true
| ...
-test_run:wait_log('replica', 'ER_SYNC_QUORUM_TIMEOUT', nil, 10)
+test_run:wait_log('replica', 'ER_SYNC_QUORUM_TIMEOUT', nil, 60)
| ---
| - ER_SYNC_QUORUM_TIMEOUT
| ...
diff --git a/test/replication/gh-5566-final-join-synchro.test.lua
b/test/replication/gh-5566-final-join-synchro.test.lua
index 14302f6e6..2db2c742f 100644
--- a/test/replication/gh-5566-final-join-synchro.test.lua
+++ b/test/replication/gh-5566-final-join-synchro.test.lua
@@ -18,7 +18,8 @@ end
_ = box.space._cluster:on_replace(trig)
orig_synchro_quorum = box.cfg.replication_synchro_quorum
-box.cfg{replication_synchro_quorum=1}
+orig_synchro_timeout = box.cfg.replication_synchro_timeout
+box.cfg{replication_synchro_quorum=1, replication_synchro_timeout=60}
test_run:cmd('create server replica with rpl_master=default,\
script="replication/replica.lua"')
@@ -33,7 +34,6 @@ test_run:cmd('delete server replica')
-- Part 2. Make sure master aborts final join if insert to _cluster is
rolled
-- back and replica is capable of retrying it.
-orig_synchro_timeout = box.cfg.replication_synchro_timeout
-- Make the trigger we used above fail with no quorum.
box.cfg{replication_synchro_quorum=2, replication_synchro_timeout=0.01}
-- Try to join the replica once again.
@@ -41,7 +41,7 @@ test_run:cmd('create server replica with
rpl_master=default,\
script="replication/replica.lua"')
test_run:cmd('start server replica with wait=False')
-test_run:wait_log('replica', 'ER_SYNC_QUORUM_TIMEOUT', nil, 10)
+test_run:wait_log('replica', 'ER_SYNC_QUORUM_TIMEOUT', nil, 60)
-- Remove the trigger to let the replica connect.
box.space._cluster:on_replace(nil, trig)
--
Serge Petrenko
next prev parent reply other threads:[~2021-03-27 19:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 12:24 [Tarantool-patches] [PATCH v2 0/7] applier: handle synchronous transactions during final Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 1/7] replication: fix a hang on final join retry Serge Petrenko via Tarantool-patches
2021-03-26 20:44 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 16:52 ` Serge Petrenko via Tarantool-patches
2021-03-29 21:50 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 2/7] applier: extract tx boundary checks from applier_read_tx into a separate routine Serge Petrenko via Tarantool-patches
2021-03-26 12:35 ` Cyrill Gorcunov via Tarantool-patches
2021-03-27 16:54 ` Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 3/7] applier: extract plain tx application from applier_apply_tx() Serge Petrenko via Tarantool-patches
2021-03-26 20:47 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 17:34 ` Serge Petrenko via Tarantool-patches
2021-03-27 18:30 ` [Tarantool-patches] [PATCH v2 3.5/7] applier: fix not releasing the latch on apply_synchro_row() fail Serge Petrenko via Tarantool-patches
2021-03-29 21:50 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-30 8:15 ` Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 4/7] applier: remove excess last_row_time update from subscribe loop Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 5/7] applier: make final join transactional Serge Petrenko via Tarantool-patches
2021-03-26 20:49 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 19:05 ` Serge Petrenko via Tarantool-patches
2021-03-29 21:51 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-30 8:15 ` Serge Petrenko via Tarantool-patches
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 6/7] replication: tolerate synchro rollback during final join Serge Petrenko via Tarantool-patches
2021-03-24 12:45 ` Serge Petrenko via Tarantool-patches
2021-03-26 20:49 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 19:23 ` Serge Petrenko via Tarantool-patches [this message]
2021-03-24 12:24 ` [Tarantool-patches] [PATCH v2 7/7] replication: do not ignore replica vclock on register Serge Petrenko via Tarantool-patches
2021-03-26 20:50 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-27 20:13 ` Serge Petrenko via Tarantool-patches
2021-03-29 21:51 ` Vladislav Shpilevoy via Tarantool-patches
2021-03-30 8:16 ` Serge Petrenko via Tarantool-patches
2021-03-30 12:33 ` Serge Petrenko via Tarantool-patches
2021-03-26 13:46 ` [Tarantool-patches] [PATCH v2 0/7] applier: handle synchronous transactions during final Cyrill Gorcunov via Tarantool-patches
2021-03-30 20:13 ` Vladislav Shpilevoy via Tarantool-patches
2021-04-05 16:15 ` Kirill Yukhin 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=d4a0511e-2af3-7a9a-8c67-718e6e6e71f3@tarantool.org \
--to=tarantool-patches@dev.tarantool.org \
--cc=gorcunov@gmail.com \
--cc=sergepetrenko@tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2 6/7] replication: tolerate synchro rollback during final join' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox