Browse Source

optimize crash recovery

recv_dblwr_t::list is used for appending to the beginning and iterating
through its elements. std::deque fits better for that purpose because
it does less allocations than std::forward_list and provides better memory
locality.
bb-10.4-MDEV-21335
Eugene Kosov 6 years ago
parent
commit
014e125830
  1. 4
      storage/innobase/include/log0recv.h

4
storage/innobase/include/log0recv.h

@ -33,7 +33,7 @@ Created 9/20/1997 Heikki Tuuri
#include "log0log.h"
#include "mtr0types.h"
#include <forward_list>
#include <deque>
/** Is recv_writer_thread active? */
extern bool recv_writer_thread_active;
@ -173,7 +173,7 @@ struct recv_dblwr_t {
@retval NULL if no page was found */
const byte* find_page(ulint space_id, ulint page_no);
typedef std::forward_list<byte*, ut_allocator<byte*> > list;
typedef std::deque<byte*, ut_allocator<byte*> > list;
/** Recovered doublewrite buffer page frames */
list pages;

Loading…
Cancel
Save