Skip to content

MDEV-29909 : SST fails when table is defined with DATA DIRECTORY='/pa…#5226

Open
janlindstrom wants to merge 1 commit into
mainfrom
13.1-MDEV-29909-fix
Open

MDEV-29909 : SST fails when table is defined with DATA DIRECTORY='/pa…#5226
janlindstrom wants to merge 1 commit into
mainfrom
13.1-MDEV-29909-fix

Conversation

@janlindstrom

Copy link
Copy Markdown
Contributor

…th/to' and datafile is larger than datadir space

std::filesystem is not available in all supported environments. Replaced by using statvfs if available. If not available return error and SST will fail.

@janlindstrom janlindstrom self-assigned this Jun 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the use of std::filesystem::space with statvfs to determine the available space on the target filesystem. A review comment points out that f_frsize can be 0 on some systems, which would incorrectly result in available space being calculated as 0 and causing the SST to fail; it suggests falling back to f_bsize in such cases.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread sql/wsrep_sst.cc Outdated
@janlindstrom

Copy link
Copy Markdown
Contributor Author

…th/to' and datafile is larger than datadir space

std::filesystem is not available in all supported environments.
Replaced by using statvfs if available. If not available
return error and SST will fail.
@RazvanLiviuVarzaru

Copy link
Copy Markdown

MDEV-29909 is closed which is a bit misleading given the current bug.
Also happening on SLES-1507 with GCC 7.5 https://buildbot.mariadb.org/#/builders/923/builds/7035/steps/4/logs/stdio

This should be promoted as a Blocker for the upcoming release i.e. compilation failures means no release packages.
fyi @grooverdan , @vuvova

@grooverdan

Copy link
Copy Markdown
Member

Raised MDEV-40512 and #5450 as quick alternate to this.

Its experimental status was around its evolving c++ interface rather than stability.

statvfs isn't fully portable. See plugin/disks/information_schema_disks.cc for what a portable implementation would take. I guess that's why they standardised this.

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.

4 participants