Commit d0ca235d authored by Haidong Ji's avatar Haidong Ji Committed by Daniel Black

MDEV-27314 InnoDB Buffer Pool Resize output cleanup

Cleaned up the log messages as suggested, with a minor code
formatting change.

On bullet point 13, I decided to not include timestamp in output
message. In most (all?) cases, the output goes to the log file,
which has timestamp already.
parent c5c61b51
......@@ -15,7 +15,7 @@ SET GLOBAL innodb_buffer_pool_size=8388608;
let $wait_timeout = 60;
let $wait_condition =
SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at '
SELECT SUBSTR(variable_value, 1, 31) = 'Completed resizing buffer pool.'
FROM information_schema.global_status
WHERE variable_name = 'INNODB_BUFFER_POOL_RESIZE_STATUS';
--source include/wait_condition.inc
......
......@@ -1444,8 +1444,8 @@ inline bool buf_pool_t::withdraw_blocks()
buf_block_t* block;
ulint loop_count = 0;
ib::info() << "start to withdraw the last "
<< withdraw_target << " blocks";
ib::info() << "Start to withdraw the last "
<< withdraw_target << " blocks.";
while (UT_LIST_GET_LEN(withdraw) < withdraw_target) {
......@@ -1528,15 +1528,15 @@ inline bool buf_pool_t::withdraw_blocks()
mysql_mutex_unlock(&mutex);
buf_resize_status(
"withdrawing blocks. (" ULINTPF "/" ULINTPF ")",
"Withdrawing blocks. (" ULINTPF "/" ULINTPF ").",
UT_LIST_GET_LEN(withdraw),
withdraw_target);
ib::info() << "withdrew "
ib::info() << "Withdrew "
<< count1 << " blocks from free list."
<< " Tried to relocate " << count2 << " pages ("
<< " Tried to relocate " << count2 << " blocks ("
<< UT_LIST_GET_LEN(withdraw) << "/"
<< withdraw_target << ")";
<< withdraw_target << ").";
if (++loop_count >= 10) {
/* give up for now.
......@@ -1559,8 +1559,8 @@ inline bool buf_pool_t::withdraw_blocks()
}
}
ib::info() << "withdrawn target: " << UT_LIST_GET_LEN(withdraw)
<< " blocks";
ib::info() << "Withdrawn target: " << UT_LIST_GET_LEN(withdraw)
<< " blocks.";
return(false);
}
......@@ -1643,7 +1643,7 @@ inline void buf_pool_t::resize()
str_new_size << ib::bytes_iec{srv_buf_pool_size};
str_chunk_size << ib::bytes_iec{srv_buf_pool_chunk_unit};
buf_resize_status("Resizing buffer pool from %s to %s (unit=%s).",
buf_resize_status("Resizing buffer pool from %s to %s (unit = %s).",
str_old_size.str().c_str(),
str_new_size.str().c_str(),
str_chunk_size.str().c_str());
......@@ -1742,7 +1742,7 @@ inline void buf_pool_t::resize()
goto withdraw_retry;
}
buf_resize_status("Latching whole of buffer pool.");
buf_resize_status("Latching entire buffer pool.");
#ifndef DBUG_OFF
{
......@@ -1773,8 +1773,8 @@ inline void buf_pool_t::resize()
/* add/delete chunks */
buf_resize_status("buffer pool resizing with chunks "
ULINTPF " to " ULINTPF ".",
buf_resize_status("Resizing buffer pool from "
ULINTPF " chunks to " ULINTPF " chunks.",
n_chunks, n_chunks_new);
if (n_chunks_new < n_chunks) {
......@@ -1815,7 +1815,7 @@ inline void buf_pool_t::resize()
withdraw_target = 0;
ib::info() << n_chunks - n_chunks_new
<< " chunks (" << sum_freed
<< " Chunks (" << sum_freed
<< " blocks) were freed.";
n_chunks = n_chunks_new;
......@@ -1934,18 +1934,18 @@ inline void buf_pool_t::resize()
if (!warning && new_size_too_diff) {
srv_buf_pool_base_size = srv_buf_pool_size;
buf_resize_status("Resizing also other hash tables.");
buf_resize_status("Resizing other hash tables.");
srv_lock_table_size = 5
* (srv_buf_pool_size >> srv_page_size_shift);
lock_sys.resize(srv_lock_table_size);
dict_sys.resize();
ib::info() << "Resized hash tables at lock_sys,"
ib::info() << "Resized hash tables: lock_sys,"
#ifdef BTR_CUR_HASH_ADAPT
" adaptive hash index,"
#endif /* BTR_CUR_HASH_ADAPT */
" dictionary.";
" and dictionary.";
}
/* normalize ibuf.max_size */
......@@ -1953,9 +1953,9 @@ inline void buf_pool_t::resize()
if (srv_buf_pool_old_size != srv_buf_pool_size) {
ib::info() << "Completed to resize buffer pool from "
ib::info() << "Completed resizing buffer pool from "
<< srv_buf_pool_old_size
<< " to " << srv_buf_pool_size << ".";
<< " to " << srv_buf_pool_size << " bytes.";
srv_buf_pool_old_size = srv_buf_pool_size;
}
......@@ -1967,15 +1967,10 @@ inline void buf_pool_t::resize()
}
#endif /* BTR_CUR_HASH_ADAPT */
char now[32];
ut_sprintf_timestamp(now);
if (!warning) {
buf_resize_status("Completed resizing buffer pool at %s.",
now);
buf_resize_status("Completed resizing buffer pool.");
} else {
buf_resize_status("Resizing buffer pool failed,"
" finished resizing at %s.", now);
buf_resize_status("Resizing buffer pool failed");
}
ut_d(validate());
......
......@@ -17310,12 +17310,12 @@ innodb_buffer_pool_size_update(THD*,st_mysql_sys_var*,void*, const void* save)
snprintf(export_vars.innodb_buffer_pool_resize_status,
sizeof(export_vars.innodb_buffer_pool_resize_status),
"Requested to resize buffer pool.");
"Buffer pool resize requested");
buf_resize_start();
ib::info() << export_vars.innodb_buffer_pool_resize_status
<< " (new size: " << in_val << " bytes)";
<< " (New size: " << in_val << " bytes).";
}
/** The latest assigned innodb_ft_aux_table name */
......
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