binlog_space_limit isn't being respected

Description

The variable binlog_space_limit isn't being respected, making the server with more data than it should on the binlog's directory.

 

How to reproduce:

I created a server with the following settings: 

I set the binlog_space_limit to 2G.

After some inserts and some writing on the binlogs, the binlogs are greater than the 2G limits: 

 When a purge binary logs or a restart on the service is done, the purge by space limit works as it should:

 

The 21 was purged together, but after that, it continued to keep more than the limit.

 

Environment

None

Smart Checklist

Activity

Show:

aristotle.po September 7, 2022 at 6:30 AM

It looks like auto-purging is preempted when binlog_expire_logs_seconds and expire_logs_days are both set to zero.

The function check_auto_purge_conditions returns true when these variables are set to zero.

binlog.cc

 

In the same file, you can see that this function is called before purging process is performed and it evaluates to true :

 

Details

Assignee

Reporter

Affects versions

Priority

Smart Checklist

Created September 2, 2022 at 7:32 PM
Updated March 6, 2024 at 10:01 AM