Commit 01e8459d authored by Eugene Kosov's avatar Eugene Kosov

MDEV-22325 ib_logfile0 is too small for innodb_thread_concurrency=0. The size...

MDEV-22325 ib_logfile0 is too small for innodb_thread_concurrency=0. The size of ib_logfile0 should be bigger than 200 kB * innodb_thread_concurrency.

Correct log message. IMO, we shouldn't be very precise in that
message as the formula behind it is not trivial.

Also performed a little cleanup.
parent 1b01833a
......@@ -44,12 +44,6 @@ Created 12/9/1995 Heikki Tuuri
using st_::span;
/* Margin for the free space in the smallest log, before a new query
step which modifies the database, is started */
#define LOG_CHECKPOINT_FREE_PER_THREAD (4U << srv_page_size_shift)
#define LOG_CHECKPOINT_EXTRA_FREE (8U << srv_page_size_shift)
static const char LOG_FILE_NAME_PREFIX[] = "ib_logfile";
static const char LOG_FILE_NAME[] = "ib_logfile0";
......
......@@ -41,10 +41,4 @@ typedef ib_uint64_t lsn_t;
#define LSN_PF UINT64PF
/** The redo log manager */
struct RedoLog;
/** The recovery implementation */
struct redo_recover_t;
#endif /* log0types_h */
......@@ -430,6 +430,12 @@ accommodate the number of OS threads in the database server */
bool
log_set_capacity(ulonglong file_size)
{
/* Margin for the free space in the smallest log, before a new query
step which modifies the database, is started */
const size_t LOG_CHECKPOINT_FREE_PER_THREAD = 4U
<< srv_page_size_shift;
const size_t LOG_CHECKPOINT_EXTRA_FREE = 8U << srv_page_size_shift;
lsn_t margin;
ulint free;
......@@ -445,14 +451,11 @@ log_set_capacity(ulonglong file_size)
free = LOG_CHECKPOINT_FREE_PER_THREAD * (10 + srv_thread_concurrency)
+ LOG_CHECKPOINT_EXTRA_FREE;
if (free >= smallest_capacity / 2) {
ib::error() << "Cannot continue operation. " << LOG_FILE_NAME
<< " is too small for innodb_thread_concurrency="
<< srv_thread_concurrency << ". The size of "
<< LOG_FILE_NAME
<< " should be bigger than 200 kB * "
"innodb_thread_concurrency. "
ib::error() << "Cannot continue operation because log file is "
"too small. Increase innodb_log_file_size "
"or decrease innodb_thread_concurrency. "
<< INNODB_PARAMETERS_MSG;
return(false);
return false;
}
margin = smallest_capacity - free;
......
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