Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Nikita Pettik <korablev@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: Sun, 10 May 2020 21:59:01 +0200	[thread overview]
Message-ID: <10f1d262-b1ae-ba9a-fdae-efc9229ccd52@tarantool.org> (raw)
In-Reply-To: <20200507223625.GB13970@tarantool.org>

Hi! Thanks for the fixes!

See 1 comment below.

> diff --git a/test/vinyl/gh-4805-open-run-err-recovery.result b/test/vinyl/gh-4805-open-run-err-recovery.result
> new file mode 100644
> index 000000000..31e0e7857
> --- /dev/null
> +++ b/test/vinyl/gh-4805-open-run-err-recovery.result
> @@ -0,0 +1,101 @@
> +-- test-run result file version 2
> +fiber = require('fiber')
> + | ---
> + | ...
> +test_run = require('test_run').new()
> + | ---
> + | ...
> +
> +test_run:cmd('create server err_recovery with script = "vinyl/errinj_recovery.lua"')
> + | ---
> + | - true
> + | ...
> +test_run:cmd('start server err_recovery')
> + | ---
> + | - true
> + | ...
> +test_run:cmd('switch err_recovery')
> + | ---
> + | - true
> + | ...
> +
> +s = box.schema.space.create('test', {engine = 'vinyl'})
> + | ---
> + | ...
> +_ = s:create_index('pk', {run_count_per_level = 100, page_size = 128, range_size = 1024})
> + | ---
> + | ...
> +
> +digest = require('digest')
> + | ---
> + | ...
> +test_run:cmd("setopt delimiter ';'")
> + | ---
> + | - true
> + | ...
> +function dump(big)
> +    local step = big and 1 or 5
> +    for i = 1, 20, step do
> +        s:replace{i, digest.urandom(1000)}
> +    end
> +    box.snapshot()
> +end;
> + | ---
> + | ...
> +test_run:cmd("setopt delimiter ''");
> + | ---
> + | - true
> + | ...
> +
> +dump(true)
> + | ---
> + | ...
> +dump()
> + | ---
> + | ...
> +dump()
> + | ---
> + | ...
> +
> +test_run:cmd('switch default')
> + | ---
> + | - true
> + | ...
> +test_run:cmd('stop server err_recovery')
> + | ---
> + | - true
> + | ...
> +test_run:cmd('start server err_recovery with crash_expected=True')
> + | ---
> + | - false
> + | ...
> +
> +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
> + | ---
> + | - true
> + | ...
> +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.

  reply	other threads:[~2020-05-10 19:59 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 [this message]
2020-05-12  1:16             ` Nikita Pettik
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=10f1d262-b1ae-ba9a-fdae-efc9229ccd52@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@dev.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