diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index 80d1708fae1..64326eedeee 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -557,8 +557,6 @@ struct recv_sys_t { application */ bool apply_log_recs; - /** This is true when a log rec application batch is running */ - bool apply_batch_on; /** Possible incomplete last recovered log block */ byte *last_block; diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index f07f5afeec7..5d4ad99e61c 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -628,7 +628,6 @@ void recv_sys_init(ulint max_mem) { recv_sys->n_addrs = 0; recv_sys->apply_log_recs = false; - recv_sys->apply_batch_on = false; recv_sys->is_cloned_db = false; recv_sys->last_block = static_cast( @@ -1227,24 +1226,14 @@ pages. the application; the caller must in this case own the log mutex */ void recv_apply_hashed_log_recs(log_t &log, bool allow_ibuf) { - for (;;) { - mutex_enter(&recv_sys->mutex); - - if (!recv_sys->apply_batch_on) { - break; - } - mutex_exit(&recv_sys->mutex); - - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - } + mutex_enter(&recv_sys->mutex); if (!allow_ibuf) { recv_no_ibuf_operations = true; } recv_sys->apply_log_recs = true; - recv_sys->apply_batch_on = true; auto batch_size = recv_sys->n_addrs; @@ -1355,7 +1344,6 @@ void recv_apply_hashed_log_recs(log_t &log, bool allow_ibuf) { } recv_sys->apply_log_recs = false; - recv_sys->apply_batch_on = false; recv_sys_empty_hash(); @@ -1588,7 +1576,6 @@ void meb_apply_log_recs_via_callback( ulint i = 0; recv_sys->apply_log_recs = true; - recv_sys->apply_batch_on = true; ib::info(ER_IB_MSG_714) << "Starting to apply a batch of log records to the" << " database..."; @@ -1615,7 +1602,6 @@ void meb_apply_log_recs_via_callback( /* write logs in next line */ fprintf(stderr, "\n"); recv_sys->apply_log_recs = false; - recv_sys->apply_batch_on = false; recv_sys_empty_hash(); }