File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1854,15 +1854,17 @@ buf_pool_init_instance(
1854
1854
UNIV_PAGE_SIZE));
1855
1855
1856
1856
/* Initialize hash structure for copy pool. */
1857
- srv_n_twb_hash_locks = static_cast <ulong>(
1858
- ut_2_power_up (srv_n_twb_hash_locks));
1859
-
1860
1857
buf_pool->twb_hash = ib_create (
1861
1858
2 * buf_pool->total_entry ,
1862
1859
LATCH_ID_HASH_TABLE_RW_LOCK,
1863
1860
srv_n_twb_hash_locks,
1864
1861
MEM_HEAP_FOR_TWB_HASH);
1865
1862
1863
+ buf_pool->twb_hash_lock = static_cast <rw_lock_t *>(
1864
+ ut_malloc_nokey (sizeof (rw_lock_t )));
1865
+ rw_lock_create (PFS_NOT_INSTRUMENTED, &buf_pool->twb_hash_lock ,
1866
+ SYNC_LEVEL_VARYING);
1867
+
1866
1868
/* Initialize a block and page structure. */
1867
1869
buf_pool->twb_block_arr = static_cast <buf_block_t *>(
1868
1870
ut_zalloc_nokey (buf_pool->total_entry * sizeof (buf_block_t )));
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ ib_create(
60
60
61
61
ut_a (type == MEM_HEAP_FOR_BTR_SEARCH
62
62
|| type == MEM_HEAP_FOR_PAGE_HASH
63
- /* mijin */
63
+ /* mijin */
64
64
|| type == MEM_HEAP_FOR_TWB_HASH
65
65
/* end */ );
66
66
Original file line number Diff line number Diff line change @@ -2294,7 +2294,7 @@ struct buf_pool_t{
2294
2294
/* !< the number of blocks in TWB */
2295
2295
hash_table_t * twb_hash; /* !< hash table of twb_meta_dir_t,
2296
2296
indexed by (space_id, offset) */
2297
- // rw_lock_t* twb_hash_lock;
2297
+ rw_lock_t * twb_hash_lock;
2298
2298
buf_block_t * twb_block_arr; /* !< array to store pointers
2299
2299
to the buffer blocks which have been cached
2300
2300
to write_buf */
You can’t perform that action at this time.
0 commit comments