Comments - Overview of MariaDB Logs
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
I have a 3-node galera cluster in version 10.4.12. On node 1 alone, there are a lot of log files generated per second, with name like 'GRA_2_nnnnnnn_v2.log':
...... -rw-rw---- 1 mysql mysql 1500 Oct 18 17:34 GRA_2_1122632_v2.log -rw-rw---- 1 mysql mysql 2152 Oct 18 17:35 GRA_2_1122633_v2.log -rw-rw---- 1 mysql mysql 1188 Oct 18 17:35 GRA_2_1122634_v2.log -rw-rw---- 1 mysql mysql 2152 Oct 18 17:37 GRA_2_1122636_v2.log -rw-rw---- 1 mysql mysql 1188 Oct 18 17:37 GRA_2_1122637_v2.log ......
Now there are ten thousands of them. Why are there such logs generated?
On the following url:
https://galeracluster.com/library/documentation/log.html
it has explanation on it....
"Whenever a node fails to apply an event on a slave node, the database server creates a special binary log file of the event in the data directory. The naming convention the node uses for the filename is GRA_*.log."
I used the command 'mysqlbinlog' to show the content of 'GRA_*.log'. I found there is the following sql embedded:
SET STATEMENT max_statement_time=300 FOR UPDATE AAA SET JOB_RUN_STATUS = 'ALREADY FOR RUNNING', LAST_UPDATE_TIME = CURRENT_TIMESTAMP(6) WHERE JOB_CODE = '............'
What is the meaning of "a node fails to apply an event on a slave node"? I have checked the table concerned, i.e. AAA. There are currently 7 records and all 7 records are sync among all the nodes on table AAA.