[PATCH v5 2/2] xlog: Remove inprogress files on start
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Jun 28 15:27:45 MSK 2018
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.
More information about the Tarantool-patches
mailing list