[Tarantool-patches] [PATCH 2/2] test: add a test for wal_cleanup_delay option
v.shpilevoy at tarantool.org
Sat Mar 20 01:17:27 MSK 2021
On 19.03.2021 13:14, Cyrill Gorcunov via Tarantool-patches wrote:
> On Fri, Mar 19, 2021 at 12:04:11AM +0100, Vladislav Shpilevoy wrote:
>>> +function func_xlog_snap(space, value)
>> 1. This fails luacheck (which I don't like having in the tests,
>> but still we must keep it green):
>> Checking test/replication/gh-5806-master.lua 1 warning
>> test/replication/gh-5806-master.lua:5:10: (W111) setting non-standard global variable func_xlog_snap
>> Checking test/replication/gh-5806-slave.lua 1 warning
>> test/replication/gh-5806-slave.lua:5:10: (W111) setting non-standard global variable func_xlog_snap
> Thanks, Vlad! Actually I don't understand what this warning means. Should I make
> these functions local or what?
Yeah, we can't declare global variables/functions. When you want
a function, you must either assign it to an index in _G, or have
it in a separate module and add it via 'require()' in the test's
body. But it should not matter now if you delete this function.
>> 4. Why do you do rw requests both on the replica and master?
> To intermix data so that lsns would be different
Why should they be different (this all better be in the comments)?
>> And why do you need 2 spaces?
> This allows to write xlog data specifically on replica and
> only in this case I managed to reach XlogGapError (otherwise
> the replica reported that it is too old and restarted rejoin
Aha, so it can't rejoin automatically, because this would lead to
data loss. I see now. Please, document it in the test.
More information about the Tarantool-patches