Skip to content

Scheduler is not unthrottled by box.snapshot() #12342

@locker

Description

@locker

But description

Reproduced with 3.7.0-entrypoint-99-g893712da90de but all older versions are affected as well.

The scheduler that plans dump and compaction tasks for Vinyl spaces is throttled if it fails to execute a task. This is necessary to avoid spamming logs with the same error in case of a repetitive disk error (e.g. running out of disk space). However, if the user calls box.snapshot() manually, the scheduler should be unthrottled immediately, but it isn't.

Steps to reproduce

Run the following script with a debug Tarantool build:

os.execute([[rm -rf [0-9]*]])

box.cfg{}

local s = box.schema.space.create('test', {engine = 'vinyl'})
s:create_index('primary')
s:insert{1, 1}

box.error.injection.set('ERRINJ_VY_RUN_WRITE', true)
box.error.injection.set('ERRINJ_VY_SCHED_TIMEOUT', 9000)

pcall(box.snapshot)

box.error.injection.set('ERRINJ_VY_RUN_WRITE', false)
box.snapshot()

os.exit()

Expected behavior

The script exits almost instantly.

Actual behavior

The script hangs.

Notes

The issue was supposed to be fixed long time ago in the scope of #3519 but the commit that closed the issue (7305fe5) was merged without any tests. It didn't work at all actually: it does clear the is_throttled flag but it doesn't wake up the scheduler fiber.

Metadata

Metadata

Assignees

Labels

3.2Target is 3.2 and all newer release/master branchesbugSomething isn't workingvinyl

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions