Skip to content

vinyl compaction may delete files needed for backup #3437

@locker

Description

@locker

Branch 1.9, commit 8ed45ce.

The following script demonstrates the problem:

log = require('log')
fio = require('fio')
fiber = require('fiber')

box.cfg{}

memtx = box.schema.space.create('memtx', {engine = 'memtx'})
memtx:create_index('pk')
vinyl = box.schema.space.create('vinyl', {engine = 'vinyl'})
vinyl:create_index('pk')
pad = string.rep('x', 1024)
for i = 1, 1000 do
    vinyl:delete{i}
    vinyl:replace{i + 1}
    memtx:delete{i}
    memtx:replace{i + 1}
    box.snapshot()
    files = box.backup.start()
    for _, f in pairs(files) do
        if not fio.path.exists(f) then
            log.error('File %s not found!', f)
            os.exit(1)
        end
    end
    box.backup.stop()
end
os.exit(0)

(If you don't get a failure, try running it on tmpfs)

Looks like the bug was introduced by commit 35db70f.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingvinyl

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions