Skip to content

Commit 999d171

Browse files
committed
optimize hash table locks.
1 parent ff05628 commit 999d171

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

storage/innobase/handler/ha_innodb.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22537,13 +22537,11 @@ static MYSQL_SYSVAR_ULONGLONG(
2253722537
ulonglong{srv_buf_pool_chunk_unit_max},
2253822538
ulonglong{srv_buf_pool_chunk_unit_blk_sz});
2253922539

22540-
#if defined UNIV_DEBUG || defined UNIV_PERF_DEBUG
2254122540
static MYSQL_SYSVAR_ULONG(page_hash_locks, srv_n_page_hash_locks,
2254222541
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
2254322542
"Number of rw_locks protecting buffer pool "
2254422543
"page_hash. Rounded up to the next power of 2",
2254522544
nullptr, nullptr, 16, 1, MAX_PAGE_HASH_LOCKS, 0);
22546-
#endif /* defined UNIV_DEBUG || defined UNIV_PERF_DEBUG */
2254722545

2254822546
static MYSQL_SYSVAR_BOOL(
2254922547
validate_tablespace_paths, srv_validate_tablespace_paths,
@@ -23588,9 +23586,7 @@ static SYS_VAR *innobase_system_variables[] = {
2358823586
MYSQL_SYSVAR(merge_threshold_set_all_debug),
2358923587
MYSQL_SYSVAR(semaphore_wait_timeout_debug),
2359023588
#endif /* UNIV_DEBUG */
23591-
#if defined UNIV_DEBUG || defined UNIV_PERF_DEBUG
2359223589
MYSQL_SYSVAR(page_hash_locks),
23593-
#endif /* defined UNIV_DEBUG || defined UNIV_PERF_DEBUG */
2359423590
MYSQL_SYSVAR(validate_tablespace_paths),
2359523591
MYSQL_SYSVAR(use_fdatasync),
2359623592
MYSQL_SYSVAR(status_output),

storage/innobase/include/buf0buf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ constexpr ulint MAX_BUFFER_POOLS = (1 << MAX_BUFFER_POOLS_BITS);
111111
#define BUF_POOL_WATCH_SIZE (srv_n_purge_threads + 1)
112112

113113
/** The maximum number of page_hash locks */
114-
constexpr ulint MAX_PAGE_HASH_LOCKS = 1024;
114+
constexpr ulint MAX_PAGE_HASH_LOCKS = 1048576;
115115

116116
/** The buffer pools of the database */
117117
extern buf_pool_t *buf_pool_ptr;

0 commit comments

Comments
 (0)