Skip to content
Permalink
Browse files
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().
  • Loading branch information
dr-m committed Sep 21, 2020
1 parent a3bdce8 commit e33f7b6
Showing 1 changed file with 6 additions and 0 deletions.
@@ -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();

0 comments on commit e33f7b6

Please sign in to comment.