Commit f10cf420 authored by Marko Makela's avatar Marko Makela

recv_sys_init(), recv_sys_empty_hash(): Shrink recv_sys->addr_hash.

recv_addr_t: Turn space,page_no into bitfields to save space on 64-bit.
This addresses Bug #53122 in the InnoDB Plugin.
parent 0ca989ea
2010-04-28 The InnoDB Team
* log/log0recv.h, log/log0recv.c:
Fix Bug#53122 InnoDB recovery uses too big a hash table for redo
log records
2010-04-27 The InnoDB Team
* handler/ha_innodb.cc, lock/lock0lock.c, row/row0mysql.c,
......
......@@ -368,8 +368,8 @@ typedef struct recv_addr_struct recv_addr_t;
struct recv_addr_struct{
enum recv_addr_state state;
/*!< recovery state of the page */
ulint space; /*!< space id */
ulint page_no;/*!< page number */
unsigned space:32;/*!< space id */
unsigned page_no:32;/*!< page number */
UT_LIST_BASE_NODE_T(recv_t)
rec_list;/*!< list of log records for this page */
hash_node_t addr_hash;/*!< hash node in the hash bucket chain */
......
......@@ -321,7 +321,7 @@ recv_sys_init(
recv_sys->len = 0;
recv_sys->recovered_offset = 0;
recv_sys->addr_hash = hash_create(available_memory / 64);
recv_sys->addr_hash = hash_create(available_memory / 512);
recv_sys->n_addrs = 0;
recv_sys->apply_log_recs = FALSE;
......@@ -361,7 +361,7 @@ recv_sys_empty_hash(void)
hash_table_free(recv_sys->addr_hash);
mem_heap_empty(recv_sys->heap);
recv_sys->addr_hash = hash_create(buf_pool_get_curr_size() / 256);
recv_sys->addr_hash = hash_create(buf_pool_get_curr_size() / 512);
}
#ifndef UNIV_HOTBACKUP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment