MDEV-33770 Alter operation hangs when encryption thread works on the same tablespace
- Background encryption threads wait for stop flag to exit early from the tablespace. Alter operation fails to set the stop flag before waiting for the encryption thread to stop using the tablespace.
This commit is contained in:
parent
d695e2de54
commit
bf49e7cfc7
@ -2755,7 +2755,7 @@ fil_space_crypt_close_tablespace(
|
||||
<< " seconds to drop space: "
|
||||
<< space->name << " ("
|
||||
<< space->id << ") active threads "
|
||||
<< cnt << "flushing="
|
||||
<< cnt << " flushing="
|
||||
<< flushing << ".";
|
||||
last = now;
|
||||
}
|
||||
|
@ -2288,13 +2288,13 @@ fil_check_pending_operations(
|
||||
fil_space_t* sp = fil_space_get_by_id(id);
|
||||
|
||||
if (sp) {
|
||||
sp->set_stopping(true);
|
||||
if (sp->crypt_data && sp->acquire()) {
|
||||
mutex_exit(&fil_system.mutex);
|
||||
fil_space_crypt_close_tablespace(sp);
|
||||
mutex_enter(&fil_system.mutex);
|
||||
sp->release();
|
||||
}
|
||||
sp->set_stopping(true);
|
||||
}
|
||||
|
||||
/* Check for pending operations. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user