Commit a1974d19 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-24426 fixup: Assertion failure on shutdown

fil_crypt_find_space_to_rotate(): Always treat the sentinel value
that indicates that we have run out of work, even if at the same
time the thread should shut down due to other reasons.

Thanks to Matthias Leich for reproducing this bug with RQG.
parent 1fe3dd00
...@@ -1572,12 +1572,11 @@ static bool fil_crypt_find_space_to_rotate( ...@@ -1572,12 +1572,11 @@ static bool fil_crypt_find_space_to_rotate(
state->space = fil_space_t::next(state->space, *recheck, state->space = fil_space_t::next(state->space, *recheck,
key_state->key_version != 0); key_state->key_version != 0);
wake = state->should_shutdown(); wake = state->should_shutdown();
if (wake) {
break;
}
if (state->space == fil_system.temp_space) { if (state->space == fil_system.temp_space) {
goto done; goto done;
} else if (wake) {
break;
} else { } else {
wake = true; wake = true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment