Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: tarantool-patches@freelists.org
Subject: Re: [PATCH] vinyl: fix recovery after aborted index creation
Date: Thu, 21 Mar 2019 22:28:38 +0300	[thread overview]
Message-ID: <20190321192838.mopufbiqw75lvl57@esperanza> (raw)
In-Reply-To: <38fc0bbe800bb3e876e501ab729bb5c1131f173a.1553195373.git.vdavydov.dev@gmail.com>

On Thu, Mar 21, 2019 at 10:11:02PM +0300, Vladimir Davydov wrote:
> There's a bug in the code building index hash on recovery: we replace
> a dropped index with any newer index, even incomplete one. Apparently,
> this is wrong, because a dropped index may have been dropped during
> final recovery and hence is still needed for initial recovery. If we
> replace it with an incomplete index in the index hash, initial recovery
> will fail with
> 
>   ER_INVALID_VYLOG_FILE: Invalid VYLOG file: LSM tree 512/1 not found
> 
> (see vy_lsm_recover()).
> 
> Fix this problem by checking create_lsn of the index that is going to
> replace a dropped one - if it's negative, we must link it to the dropped
> index via vy_lsm_recovery_info->prepared instead of inserting it into
> the hash directly.
> 
> Closes #4066
> ---
> https://github.com/tarantool/tarantool/issues/4066
> 
>  src/box/vy_log.c                 |  5 ++--
>  test/vinyl/errinj_vylog.result   | 55 ++++++++++++++++++++++++++++++++++++++++
>  test/vinyl/errinj_vylog.test.lua | 28 ++++++++++++++++++++
>  3 files changed, 86 insertions(+), 2 deletions(-)

Urgent - affects a customer. Pushed to master, 2.1, and 1.10.

      reply	other threads:[~2019-03-21 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 19:11 Vladimir Davydov
2019-03-21 19:28 ` 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=20190321192838.mopufbiqw75lvl57@esperanza \
    --to=vdavydov.dev@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH] vinyl: fix recovery after aborted index creation' \
    /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