vinyl: wake up waiters after clearing checkpoint_in_progress flag
The function `vy_space_build_index`, which builds a new index on DDL, calls `vy_scheduler_dump` on completion. If there's a checkpoint in progress, the latter will wait on `vy_scheduler::dump_cond` until `vy_scheduler::checkpoint_in_progress` is cleared. The problem is `vy_scheduler_end_checkpoint` doesn't broadcast `dump_cond` when it clears the flag. Usually, everything works fine because the condition variable is broadcast on any dump completion, and vinyl checkpoint implies a dump, but under certain conditions this may lead to a fiber hang. Let's broadcast `dump_cond` in `vy_scheduler_end_checkpoint` to be on the safe side. While we are at it, let's also inject a dump delay to the original test to make it more robust. Closes #10267 Follow-up #10234 NO_DOC=bug fix (cherry picked from commit fc3196dc)
Showing
- changelogs/unreleased/gh-10233-vy-snapshot-hang-fix.md 2 additions, 2 deletionschangelogs/unreleased/gh-10233-vy-snapshot-hang-fix.md
- src/box/vy_scheduler.c 2 additions, 0 deletionssrc/box/vy_scheduler.c
- test/vinyl-luatest/gh_10233_index_build_vs_snapshot_test.lua 31 additions, 1 deletiontest/vinyl-luatest/gh_10233_index_build_vs_snapshot_test.lua
Loading
Please register or sign in to comment