From: Nikita Pettik <korablev@tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 2/2] vinyl: drop wasted runs in case range recovery fails Date: Tue, 12 May 2020 01:16:22 +0000 [thread overview] Message-ID: <20200512011622.GA617@tarantool.org> (raw) In-Reply-To: <10f1d262-b1ae-ba9a-fdae-efc9229ccd52@tarantool.org> On 10 May 21:59, Vladislav Shpilevoy wrote: > Hi! Thanks for the fixes! > > See 1 comment below. > > > +line = fh:read(256) > > + | --- > > + | ... > > +fh:close() > > + | --- > > + | - true > > + | ... > > +string.match(line, 'failed to open') ~= nil > > Why can't you use test_run:grep_log()? It supports > searching in logs of an already crashed instance too. > See its parameters in test_run.lua. Looks like it can > solve your task. > Indeed. Here's diff: diff --git a/test/vinyl/gh-4805-open-run-err-recovery.test.lua b/test/vinyl/gh-4805-open-run-err-recovery.test.lua index 8b5895d41..0b97f09da 100644 --- a/test/vinyl/gh-4805-open-run-err-recovery.test.lua +++ b/test/vinyl/gh-4805-open-run-err-recovery.test.lua @@ -27,12 +27,8 @@ test_run:cmd('switch default') test_run:cmd('stop server err_recovery') test_run:cmd('start server err_recovery with crash_expected=True') -fio = require('fio') -fh = fio.open(fio.pathjoin(fio.cwd(), 'errinj_recovery.log'), {'O_RDONLY'}) -size = fh:seek(0, 'SEEK_END') -fh:seek(-256, 'SEEK_END') ~= nil -line = fh:read(256) -fh:close() -string.match(line, 'failed to open') ~= nil +opts = {} +opts.filename = 'errinj_recovery.log' +test_run:grep_log('err_recovery', 'failed to open', 1000, opts) ~= nil test_run:cmd('delete server err_recovery')
next prev parent reply other threads:[~2020-05-12 1:16 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-30 19:27 [Tarantool-patches] [PATCH 0/2] Fix crash in case of lack of FDs during recovery Nikita Pettik 2020-04-30 19:27 ` [Tarantool-patches] [PATCH 1/2] errinj: introduce delayed injection Nikita Pettik 2020-04-30 20:15 ` Konstantin Osipov 2020-04-30 20:55 ` Nikita Pettik 2020-05-01 19:15 ` Konstantin Osipov 2020-05-03 19:20 ` Vladislav Shpilevoy 2020-05-07 13:50 ` Nikita Pettik 2020-05-07 21:47 ` Vladislav Shpilevoy 2020-05-07 22:41 ` Nikita Pettik 2020-04-30 19:27 ` [Tarantool-patches] [PATCH 2/2] vinyl: drop wasted runs in case range recovery fails Nikita Pettik 2020-05-03 19:21 ` Vladislav Shpilevoy 2020-05-07 13:02 ` Nikita Pettik 2020-05-07 14:16 ` Konstantin Osipov 2020-05-07 21:47 ` Vladislav Shpilevoy 2020-05-07 22:37 ` Nikita Pettik 2020-05-07 21:47 ` Vladislav Shpilevoy 2020-05-07 22:36 ` Nikita Pettik 2020-05-10 19:59 ` Vladislav Shpilevoy 2020-05-12 1:16 ` Nikita Pettik [this message] 2020-05-03 19:20 ` [Tarantool-patches] [PATCH 0/2] Fix crash in case of lack of FDs during recovery Vladislav Shpilevoy 2020-05-07 14:11 ` Nikita Pettik 2020-05-12 20:53 ` Vladislav Shpilevoy 2020-05-12 20:56 ` Vladislav Shpilevoy 2020-05-12 22:45 ` Nikita Pettik 2020-05-13 20:19 ` Vladislav Shpilevoy
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=20200512011622.GA617@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 2/2] vinyl: drop wasted runs in case range recovery fails' \ /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