[PATCH] vinyl: fix recovery after aborted index creation

Vladimir Davydov vdavydov.dev at gmail.com
Thu Mar 21 22:28:38 MSK 2019


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.



More information about the Tarantool-patches mailing list