Browse Source

MDEV-12624: encryption.innodb_encryption_tables fails in buildbot with timeout

This regression was caused by MDEV-12467 encryption.create_or_replace
hangs during DROP TABLE, where if table->is_stopping() (i.e. when
tablespace is dropped) background key rotation thread calls
fil_crypt_complete_rotate_space to release space and stop rotation.
However, that function does not decrease number of rotating
threads if table->is_stopping() is true.
pull/382/head mariadb-10.1.23
Jan Lindström 9 years ago
parent
commit
acce1f37c2
  1. 5
      storage/innobase/fil/fil0crypt.cc
  2. 10
      storage/xtradb/fil/fil0crypt.cc

5
storage/innobase/fil/fil0crypt.cc

@ -2258,6 +2258,11 @@ fil_crypt_complete_rotate_space(
crypt_data->rotate_state.flushing = false;
mutex_exit(&crypt_data->mutex);
}
} else {
mutex_enter(&crypt_data->mutex);
ut_a(crypt_data->rotate_state.active_threads > 0);
crypt_data->rotate_state.active_threads--;
mutex_exit(&crypt_data->mutex);
}
}

10
storage/xtradb/fil/fil0crypt.cc

@ -2258,6 +2258,11 @@ fil_crypt_complete_rotate_space(
crypt_data->rotate_state.flushing = false;
mutex_exit(&crypt_data->mutex);
}
} else {
mutex_enter(&crypt_data->mutex);
ut_a(crypt_data->rotate_state.active_threads > 0);
crypt_data->rotate_state.active_threads--;
mutex_exit(&crypt_data->mutex);
}
}
@ -2543,8 +2548,9 @@ fil_space_crypt_close_tablespace(
if (now >= last + 30) {
ib_logf(IB_LOG_LEVEL_WARN,
"Waited %ld seconds to drop space: %s(" ULINTPF ").",
now - start, space->name, space->id);
"Waited %ld seconds to drop space: %s (" ULINTPF
") active threads %u flushing=%d.",
now - start, space->name, space->id, cnt, flushing);
last = now;
}
}

Loading…
Cancel
Save