Flood of log message: WSREP: ready state reached

Description

When event scheduler is enabled, and every time an event is executed, the following message shows on log and can't be disabled:

9294 [Note] WSREP: ready state reached

 

Having an event executing every 10 seconds, will print this message 24*60*60/10= 8640 times per day, thus, flooding the error log.

 

How to reproduce:

------------------------------------------------------------------------

SET GLOBAL event_scheduler = ON;

CREATE DATABASE IF NOT EXISTS test;

USE test;

CREATE TABLE IF NOT EXISTS messages (
id INT PRIMARY KEY AUTO_INCREMENT,
message VARCHAR(255) NOT NULL,
created_at DATETIME NOT NULL
);

CREATE EVENT test_event_every_10_second
ON SCHEDULE EVERY 10 SECOND
STARTS CURRENT_TIMESTAMP
ENDS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT INTO messages(message,created_at)
VALUES('MySQL recurring Event every 10 second',NOW());

 

– Check log to see messages every 10 seconds

----------------------------------------------------------------------

 

The source code where this message is printed is:

// Wait until wsrep has reached ready state
void wsrep_ready_wait ()
{
if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort();
while (!wsrep_ready)
{
WSREP_INFO("Waiting to reach ready state");
mysql_cond_wait (&COND_wsrep_ready, &LOCK_wsrep_ready);
}
WSREP_INFO("ready state reached");
mysql_mutex_unlock (&LOCK_wsrep_ready);
}

 

And the function is called from 2 places:

1) void Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event)
{

 

2)  pthread_handler_t handle_slave_sql(void *arg)
{

 

 

Possible fix:

Disable this message if setting log_warnings = 0;

 

On PXC 5.7, this message is printed when log_warnings = 2, but disabled on other values.

 

Environment

None

AFFECTED CS IDs

244681

Smart Checklist

Activity

Show:

puneet.kaushik September 6, 2022 at 9:25 AM

Bug Fix verified in PXC 8.0.29-21 , msgs started logging when wsrep_debug=1 !

Kathy Williamson April 22, 2020 at 11:45 AM

MySQL 5.6 is scheduled for EOL in Feb 2021.  At this time, we do not believe that this issue will be fixed prior to EOL.  If you believe this issue is important enough to be be fixed prior to EOL, or that it also affects a later version, please leave a comment and we will consider the new information.

Done

Details

Assignee

Reporter

Time tracking

1h logged

Affects versions

Priority

Smart Checklist

Created January 17, 2019 at 8:00 PM
Updated March 6, 2024 at 10:19 PM
Resolved May 17, 2022 at 8:49 AM