[Tarantool-patches] [PATCH v5 2/3] test: add a test for wal_cleanup_delay option

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Mar 26 22:45:30 MSK 2021


Thanks for the patch!

See 2 comments below.

> --- /dev/null
> +++ b/test/replication/gh-5806-xlog-cleanup.result
> @@ -0,0 +1,435 @@
> +-- test-run result file version 2
> +--
> +-- gh-5806: defer xlog cleanup to keep xlogs until
> +-- replicas present in "_cluster" are connected.
> +-- Otherwise we are getting XlogGapError since
> +-- master might go far forward from replica and
> +-- replica won't be able to connect without full
> +-- rebootstrap.
> +--
> +
> +fiber = require('fiber')
> + | ---
> + | ...
> +test_run = require('test_run').new()
> + | ---
> + | ...
> +engine = test_run:get_cfg('engine')
> + | ---
> + | ...
> +
> +--
> +-- Case 1.
> +--
> +-- First lets make sure we're getting XlogGapError in
> +-- case if wal_cleanup_delay is not used.
> +--
> +
> +test_run:cmd('create server master with script="replication/gh-5806-master.lua"')
> + | ---
> + | - true
> + | ...
> +test_run:cmd('start server master with wait=True, wait_load=True')

1. Both wait and wait_load are True by default. You don't need to specify
them. Here and in other places where you made them True.

> + | ---
> + | - true
> + | ...
> +--
> +--
> +-- Case 3: Fill _cluster with replica but then delete
> +-- the replica so that master's cleanup leave in "paused"
> +-- state, and then simply decrease the timeout to make
> +-- cleanup fiber work again.

2. Would also be good to have a test where GC is paused, but then the
replica is deleted from _cluster (so gc unref is called) and gc continues.


More information about the Tarantool-patches mailing list