mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-8268: InnoDB: Assertion failure in file buf0buf.cc line 5842 failing assertion ut_a(free_slot != NULL);
Analysis: Problem is that there is not enough temporary buffer slots for pending IO requests. Fixed by allocating same amount of temporary buffer slots as there are max pending IO requests.
This commit is contained in:
@@ -63,10 +63,6 @@ Created 11/5/1995 Heikki Tuuri
|
||||
#include "lzo/lzo1x.h"
|
||||
#endif
|
||||
|
||||
/* Number of temporary slots used for encryption/compression
|
||||
memory allocation before/after I/O operations */
|
||||
#define BUF_MAX_TMP_SLOTS 200
|
||||
|
||||
/*
|
||||
IMPLEMENTATION OF THE BUFFER POOL
|
||||
=================================
|
||||
@@ -1368,8 +1364,9 @@ buf_pool_init_instance(
|
||||
|
||||
/* Initialize the temporal memory array and slots */
|
||||
buf_pool->tmp_arr = (buf_tmp_array_t *)mem_zalloc(sizeof(buf_tmp_array_t));
|
||||
buf_pool->tmp_arr->n_slots = BUF_MAX_TMP_SLOTS;
|
||||
buf_pool->tmp_arr->slots = (buf_tmp_buffer_t*)mem_zalloc(sizeof(buf_tmp_buffer_t) * BUF_MAX_TMP_SLOTS);
|
||||
ulint n_slots = srv_n_read_io_threads * srv_n_write_io_threads * (8 * OS_AIO_N_PENDING_IOS_PER_THREAD);
|
||||
buf_pool->tmp_arr->n_slots = n_slots;
|
||||
buf_pool->tmp_arr->slots = (buf_tmp_buffer_t*)mem_zalloc(sizeof(buf_tmp_buffer_t) * n_slots);
|
||||
|
||||
buf_pool_mutex_exit(buf_pool);
|
||||
|
||||
|
||||
@@ -99,10 +99,6 @@ _increment_page_get_statistics(buf_block_t* block, trx_t* trx)
|
||||
#include "lzo/lzo1x.h"
|
||||
#endif
|
||||
|
||||
/* Number of temporary slots used for encryption/compression
|
||||
memory allocation before/after I/O operations */
|
||||
#define BUF_MAX_TMP_SLOTS 200
|
||||
|
||||
/*
|
||||
IMPLEMENTATION OF THE BUFFER POOL
|
||||
=================================
|
||||
@@ -1444,8 +1440,9 @@ buf_pool_init_instance(
|
||||
|
||||
/* Initialize the temporal memory array and slots */
|
||||
buf_pool->tmp_arr = (buf_tmp_array_t *)mem_zalloc(sizeof(buf_tmp_array_t));
|
||||
buf_pool->tmp_arr->n_slots = BUF_MAX_TMP_SLOTS;
|
||||
buf_pool->tmp_arr->slots = (buf_tmp_buffer_t*)mem_zalloc(sizeof(buf_tmp_buffer_t) * BUF_MAX_TMP_SLOTS);
|
||||
ulint n_slots = srv_n_read_io_threads * srv_n_write_io_threads * (8 * OS_AIO_N_PENDING_IOS_PER_THREAD);
|
||||
buf_pool->tmp_arr->n_slots = n_slots;
|
||||
buf_pool->tmp_arr->slots = (buf_tmp_buffer_t*)mem_zalloc(sizeof(buf_tmp_buffer_t) * n_slots);
|
||||
|
||||
buf_pool->try_LRU_scan = TRUE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user