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

MDEV-23776 Test encryption.create_or_replace fails with a warning

The test encryption.create_or_replace would occasionally fail with
a warning message from fil_check_pending_ops().

fil_crypt_find_space_to_rotate(): While waiting for available
I/O capacity, check fil_space_t::is_stopping() and release a
handle if necessary.

fil_space_crypt_close_tablespace(): Wake up the waiters in
fil_crypt_find_space_to_rotate().
parent a3bdce8f
......@@ -1483,6 +1483,11 @@ static bool fil_crypt_find_space_to_rotate(
{
/* we need iops to start rotating */
while (!state->should_shutdown() && !fil_crypt_alloc_iops(state)) {
if (state->space && state->space->is_stopping()) {
fil_space_release(state->space);
state->space = NULL;
}
os_event_reset(fil_crypt_threads_event);
os_event_wait_time(fil_crypt_threads_event, 100000);
}
......@@ -2506,6 +2511,7 @@ fil_space_crypt_close_tablespace(
/* wakeup throttle (all) sleepers */
os_event_set(fil_crypt_throttle_sleep_event);
os_event_set(fil_crypt_threads_event);
os_thread_sleep(20000);
dict_mutex_enter_for_mysql();
......
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