Skip to content

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

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

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

Conversation

@janlindstrom
Copy link
Copy Markdown
Contributor

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

Problem is that default path for SST is datadir and if there is not enough space for all datafiles it fails.

In this patch wsrep_sst_tmp_dir configuration parameter is introduced. User can now configure path where SST transfers datafiles in joiner while operation is running. Additionally, if available transfer size is compared to available disk space and if not necessary big error is produced. When transfer is completed MariaBackup will move datafiles to their correct locations.

Current rules for wsrep_sst_tmp_dir

  • can be nullptr or empty and will not be used
  • must be existing path and directory or not used
  • may not be same as datadir or not used
  • if total estimated SST payload available it should have enough available space
  • similar to current behaviour temporal .sst directory is created on path and this directory is removed after SST has finished

@janlindstrom janlindstrom self-assigned this Jun 3, 2026
Copy link
Copy Markdown

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

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 introduces a new configuration variable, wsrep_sst_tmp_dir, allowing users to specify a custom temporary directory for Galera State Snapshot Transfers (SST). It also adds a disk space validation check during SST progress reporting to ensure the target path has sufficient space. The code reviewer identified several critical issues: a flawed directory prefix check using strncmp that should be replaced with device/inode comparisons via stat; a bug where the progress check queries the unvalidated wsrep_sst_tmp_dir instead of wsrep_sst_tmp_dir_real; a potential 32-bit integer overflow and format string mismatch in the space check; and a typo in wsrep_sst_common.sh where --sst-temp-dir is parsed instead of --sst-tmp-dir.

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_var.cc Outdated
Comment thread sql/wsrep_sst.cc Outdated
Comment thread sql/wsrep_sst.cc Outdated
Comment thread scripts/wsrep_sst_common.sh Outdated
…th/to' and datafile is larger than datadir space

Problem is that default path for SST is datadir and if there is not
enough space for all datafiles it fails.

In this patch wsrep_sst_tmp_dir configuration parameter is introduced.
User can now configure path where SST transfers datafiles in joiner
while operation is running. Additionally, if available transfer
size is compared to available disk space and if not necessary
big error is produced. When transfer is completed MariaBackup
will move datafiles to their correct locations.

Current rules for wsrep_sst_tmp_dir
* can be nullptr or empty and will not be used
* must be existing path and directory or not used
* may not be same as datadir or not used
* if total estimated SST payload available it should have enough available space
* similar to current behaviour temporal .sst directory is created
on path and this directory is removed after SST has finished
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant