Audit plugin rotates file in middle of audit

Bug #1363370 reported by Olaf van Zandwijk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
High
Sergei Glushchenko
5.5
Fix Released
High
Sergei Glushchenko
5.6
Fix Released
High
Sergei Glushchenko

Bug Description

I use the Percona Audit Log Plugin, and have set the following variables (amongst others):

audit_log_rotate_on_size = 104857600
audit_log_rotations = 10

Now, when this filesize is reached the file is rotated, even if that is in the middle of an audit line:

tail of audit.log.01:
{"audit_record":{"name":"Query","record":"3088_2014-08-30T08:00:15","timestamp":"2014-08-30T08:03:30 UTC","command_class":"select","connection_id":"9456","status":0,"sqltext":"....","user":"....","host":"","os_user":""

head of audit.log
,"ip":"127.0.0.1"}}
{"audit_record":{"name":"....

That seems a bug to me. I think the file should be rotated in such a way that both files (the current audit file and the rotated one) contain complete audit lines.

Related branches

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Would you mind to post other settings of audit plugin?

Revision history for this message
Olaf van Zandwijk (olafz) wrote :

Sure.

I'm running server version 5.5.39-36.0-log, Release 36.0, Revision 697 with the following audit plugin settings:

audit_log_handler = FILE
audit_log_strategy = ASYNCHRONOUS
audit_log_file = /path/to/audit.log
audit_log_format = JSON
audit_log_policy = ALL
audit_log_rotate_on_size = 104857600
audit_log_rotations = 10

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-812

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.