Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPE-5355 Ensure logs flushes #543

Merged
merged 10 commits into from
Dec 2, 2024
Merged

Conversation

paulomach
Copy link
Contributor

@paulomach paulomach commented Oct 23, 2024

Issue

Uncertain race/failure conditions can render a case where logs are being written to rotate file, i.e. the log file being written is under the archive_<log> directory.
Logrotate needs to match filename under the default directory to rotate AND flush the files.
This renders log rotation useless.

Solution

  • ensure file exist before rotation by touching it
  • refactor for dynamic generating log rotation configuration
    • reacts to changes in configuration
  • renamed slow query to align with mysql naming
  • removed slow query from rotation list, since it's disable by default

Fixes #523

@paulomach paulomach marked this pull request as ready for review November 28, 2024 22:57
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great simplification!

templates/run_log_rotation.sh.j2 Outdated Show resolved Hide resolved
src/mysql_vm_helpers.py Outdated Show resolved Hide resolved
@paulomach paulomach merged commit 4a2e05e into main Dec 2, 2024
107 of 108 checks passed
@paulomach paulomach deleted the fix/dpe-5535-ensure-log-flush-runs branch December 2, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MySQL log rotation can break under certain circumstances
3 participants