Done
Details
Details
Assignee
Venkatesh Prasad
Venkatesh PrasadReporter
Carlos Tutte
Carlos TutteTime tracking
1h logged
Fix versions
Affects versions
Priority
Smart Checklist
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
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.