Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33763

Buffered error logging for Server error log

    XMLWordPrintable

Details

    Description

      Introduction

      Currently MariaDB error log is written in sql/log.cc function print_buffer_to_file() function that uses static buffer with size 1024 bytes. Every error message is written to file immediately. Function also uses mutex LOCK_error_log making error logging single threaded.

      Solution

      MariaDB error logging should use buffered logging similar to what Audit Plugin uses (ref : MDEV-34680).

      Summary of changes

      Buffered Logging:

      If user has requested buffered logging final logging happens at logger service that implements an in-memory buffer to reduce disk I/O by batching log writes.

      Dynamic Buffer Management:

      Add log_buffer_size system variable for user-customizable flushing based on data volume, adapting to varying workloads.

      Galera error logging:

      If configured should use same error logging interface and debug messages also if user has so requested.

      Confirm Performance Improvement:

      Attachments

        Issue Links

          Activity

            People

              janlindstrom Jan Lindström
              janlindstrom Jan Lindström
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 5d Original Estimate - 5d
                  5d
                  Remaining:
                  Time Spent - 7d 7h Remaining Estimate - 4d 1h
                  4d 1h
                  Logged:
                  Time Spent - 7d 7h Remaining Estimate - 4d 1h
                  7d 7h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.