MDEV-38936 Proactive handling of InnoDB tablespace full condition#4721
Open
FarihaIS wants to merge 1 commit intoMariaDB:mainfrom
Open
MDEV-38936 Proactive handling of InnoDB tablespace full condition#4721FarihaIS wants to merge 1 commit intoMariaDB:mainfrom
FarihaIS wants to merge 1 commit intoMariaDB:mainfrom
Conversation
|
|
InnoDB write failures occur when tablespace files exceed filesystem size limits. Current behavior logs errors but continues accepting transactions, causing repeated failures and potential data integrity issues. Add proactive monitoring by emitting warnings when InnoDB tablespaces exceed 90% of a configurable threshold. Warnings appear at each percentage point (90%, 91%, etc.) to prevent log flooding. Key features: - Two new system variables: innodb_tablespace_size_warning_threshold (default 16TB) and innodb_tablespace_size_warning_enabled (andon cord) - Per-tablespace tracking with automatic reset on TRUNCATE/DROP - Zero overhead when disabled - Progressive warnings capped at 100% Implementation hooks into fsp_try_extend_data_file() for O(1) size checking during tablespace extension. Adds 9 bytes per tablespace (m_last_size_warning_pct, m_last_warning_threshold) to fil_space_t structure. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
Contributor
|
Feature request, allow additional use cases (example, tablespace becomes larger than expected):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
InnoDB write failures occur when tablespace files exceed filesystem size limits (e.g. 16TB on ext4, 2TB on ext3 - varies by filesystem). Current behavior logs errors but continues accepting transactions, causing repeated failures, user disruption, and potential data integrity issues.
Add proactive monitoring by emitting warnings when InnoDB tablespaces exceed 90% of a configurable threshold. Warnings appear at each percentage point (90%, 91%, 92%, etc.) to prevent log flooding.
Key features:
innodb_tablespace_size_warning_threshold(default 16TB) andinnodb_tablespace_size_warning_enabled(andon cord)Implementation hooks into
fsp_try_extend_data_file()for O(1) size checking during tablespace extension. Adds 9 bytes per tablespace (m_last_size_warning_pct,m_last_warning_threshold) tofil_space_tstructure.Release Notes
Added proactive InnoDB tablespace size monitoring to prevent filesystem size limit failures. Two new system variables allow configuring warning thresholds and enable/disable functionality.
How can this PR be tested?
Execute the
innodb.tablespace_size_warningtest in mysql-test-run. This commit adds a test in theinnodbsuite.The expected behavior is to emit warnings in the error log when a tablespace grows beyond 90% of the configured threshold:
Basing the PR against the correct MariaDB version
Copyright
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.