[MDEV-11610] Logrotate to only FLUSH LOCAL ERROR LOGS, ENGINE LOGS, GENERAL LOGS Created: 2016-12-19 Updated: 2017-03-02 Due: 2017-03-03 Resolved: 2017-03-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Scripts & Clients |
| Fix Version/s: | 10.0.30, 10.1.22, 10.2.5 |
| Type: | Task | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | contribution, foundation, mysqladmin, packaging, patch | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
To reduce some of the side effects of log rotation of binary logs, including stalling on large transactions and other errors ( Avoiding writing to the binlog is also preferable as the slaves will have their on logrotate. Requires including these options to mysqladmin and changing ./debian/mariadb-server-10.2.mysql-server.logrotate |
| Comments |
| Comment by Daniel Black [ 2016-12-20 ] | |||||||||||||
|
Any opinion on this otto? | |||||||||||||
| Comment by Otto Kekäläinen [ 2016-12-21 ] | |||||||||||||
|
Can you rephrase the question as a diff? To me https://anonscm.debian.org/cgit/pkg-mysql/mariadb-10.0.git/tree/debian/mariadb-server-10.0.mysql-server.logrotate and https://github.com/MariaDB/server/blob/10.2/debian/mariadb-server-10.2.mysql-server.logrotate looks good. | |||||||||||||
| Comment by Daniel Black [ 2016-12-21 ] | |||||||||||||
|
Once implemented in mysqladmin would look something like:
Its intentionally not instructing mariadb to rotate the binary logs at the log rotate time. This because of reliability issues (that I'm sure will be worked though) but also this has an effect on large transactions that may be occurring at log rotation time. Binary log are controlled by max_binlog_size and expire_log_days so the lack of a daily/weekly logrotate seems like a good tradeoff. | |||||||||||||
| Comment by Otto Kekäläinen [ 2017-01-22 ] | |||||||||||||
|
LGTM | |||||||||||||
| Comment by Daniel Black [ 2017-02-01 ] | |||||||||||||
|
To be clear, the server side of this implementation by support of various individual FLUSH options (https://mariadb.com/kb/en/mariadb/flush/) is already complete. This just requires the client mysqladmin to implement mapping command line options (as suggested above) to the SQL. | |||||||||||||
| Comment by Daniel Black [ 2017-03-01 ] | |||||||||||||
|
serg, I'm hoping this isn't too late for 10.0.30 and in light of the large incomplete list of crash bugs references here who suffer segfaults as a result of flush-logs this was an easy fix. All it does is stop flushing binary logs during logrotate. Only mysqladmin and associated scripts are changed. No server core changed in the attached PR. | |||||||||||||
| Comment by Sergei Golubchik [ 2017-03-01 ] | |||||||||||||
|
danblack, sure, I think it's a good change even unrelated to other bugs. But I don't understand this --local flag. Where did you find mysqladmin that supports it? | |||||||||||||
| Comment by Daniel Black [ 2017-03-01 ] | |||||||||||||
|
It didn't support it. I added it. https://github.com/MariaDB/server/pull/323/commits/be82664a331808637755448948c8be7ba14aa258 |