Description

None

Environment

None

Activity

Show:

Oleksandr Kachan August 19, 2024 at 1:27 PM

We found the root cause of the issue. It is going to be fixed for the next Percona Server 8.0 release (8.0.39).

Oleksandr Kachan August 19, 2024 at 12:20 PM

Hello,

I addition, now can confirm issues with slow_query_log_file system variable value being initialized by the wrong config value. Reproduced it with latest 8.0 code.

show variables like '%log_file';
Variable_name   Value
general_log_file        mysqld_general
slow_query_log_file     mysqld_general.000001

Oleksandr Kachan August 6, 2024 at 12:19 PM

Hello,

The described behavior of slow_query_log_file system variable is a result of how slow log rotation is implemented. When slow log rotation is enabled it adds a numeric extension to log name. This extension is incremented for each new log. The slow_query_log_file now points to currently active slow log file and is updated each time new log file is created. So currently it is expected behavior.

In general this behavior could be changed but we’d need to revise slow log rotation implementation for this.

Aaditya Dubey February 22, 2022 at 3:23 PM
Edited

Hi

Thank you for updated reproducible test case, with the given test i'm able to reproduced the issue.
 
Current behaviour:

 

Expected behaviour: should have the same name of slow and general log file what is mentioned in configuration file. 

Thanks,
Aaditya Dubey

Louis Le Page February 21, 2022 at 3:44 PM

Hi Aaditya,

sorry, my mistake. I forgot to make clear that it happens when enabling the slowlog-rotation by setting `max_slowlog_size = 1G` in the my.cnf.
For some reason I thought the rotation was active per default.
This is also why I linked the Issue  where the rotation feature for the slowlog was fixed/enabled. I think they are related. 

Without activating the rotation, I get the same results as you and the variables and filenames work as intended.
But with the following configuration I get the described error.

Version for test case:

Minimal settings needed for mysqld in my.cnf (tested with just these vars set):

 

Restart mysql to load my.cnf:

In runtime this produces:

 

And creates the following files:

mysql_from_conf.generallog.000001 contais the general-log and mysql_from_conf.slowlog.000001 contains slow-log.

Also, when enabling the slowlog-rotation by setting `max_slowlog_size = 1G` this also changes the name of the file of the general log and adds the same digits as it does with the slowlog, however they are not present in the runtime representation.
The system also seems to rotate the general_log upon restart, as it does with the slow log. However I can not say if that is intended or not.

By setting all variables in my.cnf for mysqld as described above and using the current version `5.7.36-39` you should be able to reproduce the error.
I was able to reproduce it on a new VM with a fresh installation of percona server 5.7.36-39 via apt.

Thank you and best,

Louis

 

 

 

Pinned fields
Click on the next to a field label to start pinning.
Details

Assignee

Unassigned

Reporter

Julia Vural

Priority

Smart Checklist
Created November 13, 2024 at 9:19 AM
Updated November 13, 2024 at 9:22 AM
Loading...