vinyl: wake up waiters after clearing checkpoint_in_progress flag#10271
Merged
locker merged 1 commit intotarantool:masterfrom Jul 18, 2024
Merged
vinyl: wake up waiters after clearing checkpoint_in_progress flag#10271locker merged 1 commit intotarantool:masterfrom
checkpoint_in_progress flag#10271locker merged 1 commit intotarantool:masterfrom
Conversation
andreyaksenov
approved these changes
Jul 18, 2024
fc92eb1 to
0cdb171
Compare
0cdb171 to
6b46642
Compare
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 tarantool#10267 Follow-up tarantool#10234 NO_DOC=bug fix
6b46642 to
759933a
Compare
nshy
approved these changes
Jul 18, 2024
Member
Author
|
Cherry-picked to 2.11 and 3.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The function
vy_space_build_index, which builds a new index on DDL, callsvy_scheduler_dumpon completion. If there's a checkpoint in progress, the latter will wait onvy_scheduler::dump_conduntilvy_scheduler::checkpoint_in_progressis cleared. The problem isvy_scheduler_end_checkpointdoesn't broadcastdump_condwhen 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 broadcastdump_condinvy_scheduler_end_checkpointto be on the safe side.Closes #10267
Follow-up #10234