Tarantool development patches archive
 help / color / mirror / Atom feed
From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>,
	tml <tarantool-patches@dev.tarantool.org>
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v3 2/3] test: add a test for wal_cleanup_delay option
Date: Wed, 24 Mar 2021 16:20:50 +0300	[thread overview]
Message-ID: <135ceac2-d74c-a2fe-13ab-aa73c379c11a@tarantool.org> (raw)
In-Reply-To: <20210323154710.1696442-3-gorcunov@gmail.com>



23.03.2021 18:47, Cyrill Gorcunov пишет:
> +-- Wait error to appear.
> +test_run:wait_log('master', 'XlogGapError', 1024, 0.1) ~= nil

Thanks for the patch!

You should wait more here. Like, 10 seconds, I think.
Otherwise the test will probably flaky fail on CI.
Most our wait for at most N seconds until condition calls end up with 10 
second timeout (or bigger).

> +
> +--
> +-- Cleanup.
> +test_run:cmd('stop server master')
> +test_run:cmd('stop server replica')
> +test_run:cmd('delete server master')
> +test_run:cmd('delete server replica')
> +
> +--
> +-- Case 2.
> +--
> +-- Lets make sure we're not getting XlogGapError in
> +-- case if wal_cleanup_delay is used the code is almost
> +-- the same as for Case 1 except we don't disable cleanup
> +-- fiber but delay it up to a hour until replica is up
> +-- and running.
> +--
> +
> +test_run:cmd('create server master with script="replication/gh-5806-master.lua"')
> +test_run:cmd('start server master with args="3600", wait=True, wait_load=True')
> +
> +test_run:switch('master')
> +box.schema.user.grant('guest', 'replication')
> +
> +box.cfg{checkpoint_count = 1}
> +
> +engine = test_run:get_cfg('engine')
> +s = box.schema.space.create('test', {engine = engine})
> +_ = s:create_index('pk')
> +
> +test_run:switch('default')
> +test_run:cmd('create server replica with rpl_master=master,\
> +              script="replication/gh-5806-slave.lua"')
> +test_run:cmd('start server replica with wait=True, wait_load=True')
> +
> +test_run:switch('replica')
> +box.cfg{checkpoint_count = 1}
> +s = box.schema.space.create('testreplica')
> +_ = s:create_index('pk')
> +box.space.testreplica:insert({1})
> +box.snapshot()
> +
> +test_run:switch('default')
> +test_run:cmd('stop server replica')
> +
> +test_run:switch('master')
> +box.space.test:insert({1})
> +box.snapshot()
> +
> +test_run:switch('default')
> +test_run:cmd('restart server master with args="3600", wait=True, wait_load=True')
> +test_run:switch('master')
> +box.space.test:insert({2})
> +box.snapshot()
> +assert(box.info.gc().is_paused == true)
> +
> +test_run:switch('default')
> +test_run:cmd('start server replica with wait=True, wait_load=True')
> +
> +--
> +-- Make sure no error happened.
> +assert(test_run:grep_log("master", "XlogGapError") == nil)
> +
> +test_run:cmd('stop server master')
> +test_run:cmd('stop server replica')
> +test_run:cmd('delete server master')
> +test_run:cmd('delete server replica')

-- 
Serge Petrenko


  reply	other threads:[~2021-03-24 13:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 15:47 [Tarantool-patches] [PATCH v3 0/3] gc/xlog: delay xlog cleanup until relays are subscribed Cyrill Gorcunov via Tarantool-patches
2021-03-23 15:47 ` [Tarantool-patches] [PATCH v3 1/3] " Cyrill Gorcunov via Tarantool-patches
2021-03-24 13:09   ` Serge Petrenko via Tarantool-patches
2021-03-24 15:00     ` Cyrill Gorcunov via Tarantool-patches
2021-03-25  7:12       ` Serge Petrenko via Tarantool-patches
2021-03-23 15:47 ` [Tarantool-patches] [PATCH v3 2/3] test: add a test for wal_cleanup_delay option Cyrill Gorcunov via Tarantool-patches
2021-03-24 13:20   ` Serge Petrenko via Tarantool-patches [this message]
2021-03-23 15:47 ` [Tarantool-patches] [PATCH v3 3/3] test: box-tap/gc -- add test for is_paused field Cyrill Gorcunov via Tarantool-patches
2021-03-24 13:27   ` Serge Petrenko via Tarantool-patches
2021-03-23 18:33 ` [Tarantool-patches] [PATCH v3 0/3] gc/xlog: delay xlog cleanup until relays are subscribed Cyrill Gorcunov via Tarantool-patches
2021-03-23 19:07   ` Cyrill Gorcunov via Tarantool-patches
2021-03-24 12:47 ` Serge Petrenko via Tarantool-patches
2021-03-24 14:42   ` Cyrill Gorcunov via Tarantool-patches
2021-03-25  7:13     ` Serge Petrenko 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=135ceac2-d74c-a2fe-13ab-aa73c379c11a@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 v3 2/3] test: add a test for wal_cleanup_delay option' \
    /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