MDEV-29909 : SST fails when table is defined with DATA DIRECTORY='/pa…#5174
MDEV-29909 : SST fails when table is defined with DATA DIRECTORY='/pa…#5174janlindstrom wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
…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
55e4015 to
02e1853
Compare
…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