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

MDEV-36270 mariabackup.incremental_compressed fails in 10.11+ #3890

Open
wants to merge 1 commit into
base: 10.5
Choose a base branch
from

Conversation

Thirunarayanan
Copy link
Member

  • The Jira issue number for this PR is: MDEV-36270

Description

Problem:

  • During prepare of incremental backup, mariabackup does create new file in target directory with default file size of 4 * innodb_page_size. While applying .delta file to corresponding data file, it encounters the FSP_SIZE modification on page0 and tries to extend the file to the size which is 4 in our case. Since the table is in compressed row format, page_size for the table is 8k. This lead to shrinking of tablespace file from 65536 to
  1. This issue happens only in windows because os_file_set_size() doesn't check for the current size and shrinks the file.

Solution:

xtrabackup_apply_delta(): Check for the current size before doing setting size for the file.

How can this PR be tested?

./mtr mariabackup.incremental_compressed

Basing the PR against the correct MariaDB version

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@Thirunarayanan Thirunarayanan requested a review from dr-m March 12, 2025 13:00
@CLAassistant
Copy link

CLAassistant commented Mar 12, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@dr-m dr-m left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me. Shouldn’t the target version be the earilest affected one (10.5)? We have seen this code fail in 10.4 about a year ago.

@Thirunarayanan Thirunarayanan changed the base branch from 10.11 to 10.5 March 14, 2025 06:05
- During prepare of incremental backup, mariabackup does create
new file in target directory with default file size of
4 * innodb_page_size. While applying .delta file to corresponding
data file, it encounters the FSP_SIZE modification on page0 and
tries to extend the file to the size which is 4 in our case.
Since the table is in compressed row format, page_size for the
table is 8k. This lead to shrinking of tablespace file from 65536
to 32768. This issue happens only in windows because
os_file_set_size() doesn't check for the current size
and shrinks the file.

Solution:
========
xtrabackup_apply_delta(): Check for the current size before
doing setting size for the file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants