[MDEV-13447] binary log rotation not honouring expire_log_days Created: 2017-08-04 Updated: 2017-08-10 Resolved: 2017-08-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Server |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andrew Ramsay | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | log, logrotate | ||
| Environment: |
win7x64 32GB RAM 1TB SSD |
||
| Attachments: |
|
| Description |
|
Binary logs are not being deleted by mariadb server in line with the expire_log_days variable. I have been watching this for a while on 10.2.7 and it seems random when deletion actually takes place (might it possibly be being triggered by some specific action occurring, other than time passing?). |
| Comments |
| Comment by Elena Stepanova [ 2017-08-04 ] |
|
It is the problem of insufficient documentation. Expired logs aren't deleted upon any particular time checkpoint, they are deleted either when the binary logs are rotated – upon FLUSH LOGS, or upon automatic creation of the next binary log when the previous one reached the maximum size, or upon server restart. Does it correlate with what you have observed? In your dir.list the last log rotation happened on 2017-08-02 16:08, while the first undeleted log is dated 2017-07-31 16:11, so it still fits into 2 days timeout, however barely. |
| Comment by Andrew Ramsay [ 2017-08-04 ] |
|
Ah, that probably does explain what I've seen, thank you. So, the documentation means to say: "expire_log_days is the maximum period, in days, between the creation of the most recent log and the last time the earliest log was written to"? |
| Comment by Elena Stepanova [ 2017-08-04 ] |
|
I'll leave it to greenman to phrase it in a right way, he'll do it much better than I. |
| Comment by Ian Gilfillan [ 2017-08-10 ] |
|
Clarified on https://mariadb.com/kb/en/mariadb/replication-and-binary-log-server-system-variables/#expire_logs_days |