mirror of
https://github.com/MariaDB/server.git
synced 2025-11-30 05:23:50 +03:00
Merge 10.1 into 10.2
This commit is contained in:
@@ -883,17 +883,15 @@ btr_scrub_update_total_stat(btr_scrub_t *scrub_data)
|
|||||||
memset(&scrub_data->scrub_stat, 0, sizeof(scrub_data->scrub_stat));
|
memset(&scrub_data->scrub_stat, 0, sizeof(scrub_data->scrub_stat));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************//**
|
/** Complete iterating a space.
|
||||||
Complete iterating a space */
|
@param[in,out] scrub_data scrub data */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
bool
|
void
|
||||||
btr_scrub_complete_space(
|
btr_scrub_complete_space(btr_scrub_t* scrub_data)
|
||||||
/*=====================*/
|
|
||||||
btr_scrub_t* scrub_data) /*!< in/out: scrub data */
|
|
||||||
{
|
{
|
||||||
|
ut_ad(scrub_data->scrubbing);
|
||||||
btr_scrub_table_close_for_thread(scrub_data);
|
btr_scrub_table_close_for_thread(scrub_data);
|
||||||
btr_scrub_update_total_stat(scrub_data);
|
btr_scrub_update_total_stat(scrub_data);
|
||||||
return scrub_data->scrubbing;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
|||||||
@@ -2083,7 +2083,8 @@ fil_crypt_complete_rotate_space(
|
|||||||
mutex_exit(&crypt_data->mutex);
|
mutex_exit(&crypt_data->mutex);
|
||||||
|
|
||||||
/* all threads must call btr_scrub_complete_space wo/ mutex held */
|
/* all threads must call btr_scrub_complete_space wo/ mutex held */
|
||||||
if (btr_scrub_complete_space(&state->scrub_data) == true) {
|
if (state->scrub_data.scrubbing) {
|
||||||
|
btr_scrub_complete_space(&state->scrub_data);
|
||||||
if (should_flush) {
|
if (should_flush) {
|
||||||
/* only last thread updates last_scrub_completed */
|
/* only last thread updates last_scrub_completed */
|
||||||
ut_ad(crypt_data);
|
ut_ad(crypt_data);
|
||||||
|
|||||||
@@ -154,13 +154,10 @@ btr_scrub_start_space(
|
|||||||
ulint space, /*!< in: space */
|
ulint space, /*!< in: space */
|
||||||
btr_scrub_t* scrub_data); /*!< in/out: scrub data */
|
btr_scrub_t* scrub_data); /*!< in/out: scrub data */
|
||||||
|
|
||||||
/****************************************************************
|
/** Complete iterating a space.
|
||||||
Complete iterating a space
|
@param[in,out] scrub_data scrub data */
|
||||||
* @return true if space was scrubbed */
|
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
bool
|
void
|
||||||
btr_scrub_complete_space(
|
btr_scrub_complete_space(btr_scrub_t* scrub_data);
|
||||||
/*=====================*/
|
|
||||||
btr_scrub_t* scrub_data); /*!< in/out: scrub data */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2729,6 +2729,7 @@ files_checked:
|
|||||||
will flush dirty pages and that might need e.g.
|
will flush dirty pages and that might need e.g.
|
||||||
fil_crypt_threads_event. */
|
fil_crypt_threads_event. */
|
||||||
fil_system_enter();
|
fil_system_enter();
|
||||||
|
btr_scrub_init();
|
||||||
fil_crypt_threads_init();
|
fil_crypt_threads_init();
|
||||||
fil_system_exit();
|
fil_system_exit();
|
||||||
|
|
||||||
@@ -2739,9 +2740,6 @@ files_checked:
|
|||||||
*/
|
*/
|
||||||
log_make_checkpoint_at(LSN_MAX, TRUE);
|
log_make_checkpoint_at(LSN_MAX, TRUE);
|
||||||
|
|
||||||
/* Init data for datafile scrub threads */
|
|
||||||
btr_scrub_init();
|
|
||||||
|
|
||||||
/* Initialize online defragmentation. */
|
/* Initialize online defragmentation. */
|
||||||
btr_defragment_init();
|
btr_defragment_init();
|
||||||
btr_defragment_thread_active = true;
|
btr_defragment_thread_active = true;
|
||||||
|
|||||||
@@ -886,17 +886,15 @@ btr_scrub_update_total_stat(btr_scrub_t *scrub_data)
|
|||||||
memset(&scrub_data->scrub_stat, 0, sizeof(scrub_data->scrub_stat));
|
memset(&scrub_data->scrub_stat, 0, sizeof(scrub_data->scrub_stat));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************//**
|
/** Complete iterating a space.
|
||||||
Complete iterating a space */
|
@param[in,out] scrub_data scrub data */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
bool
|
void
|
||||||
btr_scrub_complete_space(
|
btr_scrub_complete_space(btr_scrub_t* scrub_data)
|
||||||
/*=====================*/
|
|
||||||
btr_scrub_t* scrub_data) /*!< in/out: scrub data */
|
|
||||||
{
|
{
|
||||||
|
ut_ad(scrub_data->scrubbing);
|
||||||
btr_scrub_table_close_for_thread(scrub_data);
|
btr_scrub_table_close_for_thread(scrub_data);
|
||||||
btr_scrub_update_total_stat(scrub_data);
|
btr_scrub_update_total_stat(scrub_data);
|
||||||
return scrub_data->scrubbing;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
|||||||
@@ -2127,7 +2127,8 @@ fil_crypt_complete_rotate_space(
|
|||||||
mutex_exit(&crypt_data->mutex);
|
mutex_exit(&crypt_data->mutex);
|
||||||
|
|
||||||
/* all threads must call btr_scrub_complete_space wo/ mutex held */
|
/* all threads must call btr_scrub_complete_space wo/ mutex held */
|
||||||
if (btr_scrub_complete_space(&state->scrub_data) == true) {
|
if (state->scrub_data.scrubbing) {
|
||||||
|
btr_scrub_complete_space(&state->scrub_data);
|
||||||
if (should_flush) {
|
if (should_flush) {
|
||||||
/* only last thread updates last_scrub_completed */
|
/* only last thread updates last_scrub_completed */
|
||||||
ut_ad(crypt_data);
|
ut_ad(crypt_data);
|
||||||
|
|||||||
@@ -154,13 +154,10 @@ btr_scrub_start_space(
|
|||||||
ulint space, /*!< in: space */
|
ulint space, /*!< in: space */
|
||||||
btr_scrub_t* scrub_data); /*!< in/out: scrub data */
|
btr_scrub_t* scrub_data); /*!< in/out: scrub data */
|
||||||
|
|
||||||
/****************************************************************
|
/** Complete iterating a space.
|
||||||
Complete iterating a space
|
@param[in,out] scrub_data scrub data */
|
||||||
* @return true if space was scrubbed */
|
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
bool
|
void
|
||||||
btr_scrub_complete_space(
|
btr_scrub_complete_space(btr_scrub_t* scrub_data);
|
||||||
/*=====================*/
|
|
||||||
btr_scrub_t* scrub_data); /*!< in/out: scrub data */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -3115,12 +3115,10 @@ files_checked:
|
|||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
/* Create thread(s) that handles key rotation */
|
/* Create thread(s) that handles key rotation */
|
||||||
fil_system_enter();
|
fil_system_enter();
|
||||||
|
btr_scrub_init();
|
||||||
fil_crypt_threads_init();
|
fil_crypt_threads_init();
|
||||||
fil_system_exit();
|
fil_system_exit();
|
||||||
|
|
||||||
/* Init data for datafile scrub threads */
|
|
||||||
btr_scrub_init();
|
|
||||||
|
|
||||||
/* Initialize online defragmentation. */
|
/* Initialize online defragmentation. */
|
||||||
btr_defragment_init();
|
btr_defragment_init();
|
||||||
btr_defragment_thread_active = true;
|
btr_defragment_thread_active = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user