Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: Ilya Markov <imarkov@tarantool.org>
Cc: georgy@tarantool.org, tarantool-patches@freelists.org
Subject: Re: [PATCH v5 2/2] xlog: Remove inprogress files on start
Date: Thu, 28 Jun 2018 15:27:45 +0300	[thread overview]
Message-ID: <20180628122745.rqc43nt75wi62mkn@esperanza> (raw)
In-Reply-To: <1767e811d5608a47549cdcd750ab77d0c8f82970.1529511845.git.imarkov@tarantool.org>

On Wed, Jun 20, 2018 at 07:25:56PM +0300, Ilya Markov wrote:
> When tarantool crashes during writing to vylog, index, run or snapshot,
> inprogress files remain. But garbage collector doesn't take into account
> these files. So they remain until they are removed manually.
> 
> Fix this with adding deletion of such files to functions memtx_engine_end_recovery,
> vinyl_engine_end_recovery and vy_run_remove_files.
> 
> - Add 3 errinj which simulate the crash before renaming inprogress files.
> - Moved const string inprogress_suffix to xlog.h and replace it with
>   #defiled string in order to reuse it in vinyl run and index files removal.
> - Add 2 new vy_file_type in order to support formatting of inprogress
>   files names.
> 
> Closes #3406
> ---
>  src/box/memtx_engine.c   |   1 +
>  src/box/vinyl.c          |   3 +
>  src/box/vy_log.c         |   7 +-
>  src/box/vy_run.c         |  19 ++++-
>  src/box/vy_run.h         |   2 +
>  src/box/xlog.c           |  29 +++++++-
>  src/box/xlog.h           |  11 +++
>  src/errinj.h             |   3 +
>  test/box/errinj.result   | 185 +++++++++++++++++++++++++++++++++++++++++++++++
>  test/box/errinj.test.lua |  72 +++++++++++++++++-
>  10 files changed, 326 insertions(+), 6 deletions(-)

Reworked the test, polished the code, and pushed.

      reply	other threads:[~2018-06-28 12:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-09 14:46 [tarantool-patches] [xlog 1/1] " Ilya Markov
2018-06-18  9:44 ` Vladimir Davydov
2018-06-18 16:23   ` [PATCH v2] " Ilya Markov
2018-06-19 11:50     ` Vladimir Davydov
2018-06-19 13:14   ` [PATCH v3] " Ilya Markov
2018-06-20 12:08     ` Vladimir Davydov
2018-06-20 13:48       ` [PATCH 0/2 v4] xdir: " Ilya Markov
2018-06-20 13:48         ` [PATCH 1/2 v4] xdir: Change log messages in gc functions Ilya Markov
2018-06-20 13:48         ` [PATCH 2/2 v4] xlog: Remove inprogress files on start Ilya Markov
2018-06-20 16:25       ` [PATCH v5 0/2] " Ilya Markov
2018-06-20 16:25         ` [PATCH v5 1/2] xdir: Change log messages in gc functions Ilya Markov
2018-06-28 12:26           ` Vladimir Davydov
2018-06-20 16:25         ` [PATCH v5 2/2] xlog: Remove inprogress files on start Ilya Markov
2018-06-28 12:27           ` Vladimir Davydov [this message]

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=20180628122745.rqc43nt75wi62mkn@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=georgy@tarantool.org \
    --cc=imarkov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH v5 2/2] xlog: Remove inprogress files on start' \
    /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