Commit graph

5170 commits

Author SHA1 Message Date
Marko Mäkelä
5e8714b7b2 Merge 11.7 into main 2025-01-09 13:46:06 +02:00
Marko Mäkelä
15700f54c2 Merge 11.4 into 11.7 2025-01-09 09:41:38 +02:00
Marko Mäkelä
17f01186f5 Merge 10.11 into 11.4 2025-01-09 07:58:08 +02:00
Marko Mäkelä
420d9eb27f Merge 10.6 into 10.11 2025-01-08 12:51:26 +02:00
Marko Mäkelä
b251cb6a4f Merge 10.5 into 10.6 2025-01-08 08:48:21 +02:00
Julius Goryavsky
fd9a11d8a5 MDEV-35749: Add support for --use-memory option for SST with mariabackup
Mariabackup (mariadb-backup) supports the --use-memory option that
sets the buffer pool size for innodb. However, current SST scripts
do not use this option. This commit adds support for this option,
the value for which can be specified via the "use_memory" parameter
in the configuration file in the [sst], [mariabackup] or [xtrabackup]
sections (supported only for compatibility with old configurations).

In addition, if the innodb_buffer_pool_size option is specified in
the user configuration (in the main server configuration sections)
or passed to the SST scripts or the server via arguments, its value
is also passed to mariadb-backup as the value for the --use-memory
option.

A new section name [mariabackup] has also been added, which can
be used instead of the deprecated [xtrabackup] (the section name
"mariabackup" was specified in the documentation, but was not
actually supported by SST scripts before this commit).
2025-01-06 01:43:42 +01:00
Marko Mäkelä
3f914afd3a Merge 10.6 into 10.11 2025-01-02 12:39:56 +02:00
Marko Mäkelä
a54d151fc1 Merge 10.6 into 10.11 2024-12-19 15:38:53 +02:00
Yuchen Pei
671f80c738
Merge branch '10.5' into 10.6 2024-12-17 11:06:09 +11:00
Yuchen Pei
77c9917663
MDEV-34716 Fix mysql.servers socket max length too short
The limit of socket length on unix according to libc is 108, see
sockaddr_un::sun_path, but in the table it is a string of max length
64, which results in truncation of socket and failure to connect by
plugins using servers such as spider.
2024-12-17 10:40:57 +11:00
Julius Goryavsky
155203c352 Merge branch '10.5' into '10.6' 2024-12-13 01:45:35 +01:00
Julius Goryavsky
3e34e4c161 MDEV-34820: wsrep_sst_mariabackup get_footprint() portability and accuracy fix
Added get_footprint() implementation for FreeBSD (and for other
non-Linux systems), and added "apparent file size" mode for Linux
to take into account the real file size (without compression) when
used with filesystems like ZFS.
2024-12-13 01:41:14 +01:00
Julius Goryavsky
b52f88edf8 MDEV-35387: wsrep_sst_rsync crash if aria_log_dir_path is defined
This commit fixes some functions in wsrep_sst_common
to ensure that now and in the future return codes from
a number of helper functions will be zero on success.
2024-12-13 01:41:07 +01:00
Julius Goryavsky
71a9b3bf16 galera sst scripts: fix for error hangling code
Fixed some issues in the script code, mainly related
to handling situations when a failure occurs:

1) the signal handler in the mariadb-backup SST script
   was using an uninitialized variable when trying to kill
   a hung streaming process;
2) inaccurate error messages were being logged sometime;
3) after completing SST, temporary or old (extra) files
   could remain in database directories.
2024-12-13 01:36:59 +01:00
Marko Mäkelä
f0961301c8 Merge 11.7 into main 2024-12-02 17:55:44 +02:00
Marko Mäkelä
33907f9ec6 Merge 11.4 into 11.7 2024-12-02 17:51:17 +02:00
Marko Mäkelä
2719cc4925 Merge 10.11 into 11.4 2024-12-02 11:35:34 +02:00
Marko Mäkelä
3d23adb766 Merge 10.6 into 10.11 2024-11-29 13:43:17 +02:00
Marko Mäkelä
7d4077cc11 Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
Ahmed Ibrahim
a35f744d78 MDEV-31736: format_bytes implementation 2024-11-26 13:10:01 +04:00
Julius Goryavsky
76fc26d632 galera SST scripts: correction of the grep pattern 2024-11-19 03:16:57 +01:00
Daniel Black
540288ac7c Fix URL in mariadb-install (no longer on launchpad)
Reviewer: Faustin
2024-11-19 08:48:40 +11:00
Hartmut Holzgraefe
a927e59e63 MDEV-34847 : Unquoted argument in {{logger}} call leads to invalid argument warnings
Make sure that even a quoted argument starting with '-' is not interpreted
as a command line option by adding '--' marker before message text
2024-11-12 21:14:03 +11:00
Hartmut Holzgraefe
1802785cc2 MDEV-34847 : Unquoted argument in {{logger}} call leads to invalid argument warnings
Added missing logger command argument quoting.

And fixed a wsrep_log call typo.
2024-11-12 21:14:03 +11:00
Yuchen Pei
d2eba35653
MDEV-34716 Allow arbitrary options in CREATE SERVER
The existing syntax for CREATE SERVER

CREATE [OR REPLACE] SERVER [IF NOT EXISTS] server_name
    FOREIGN DATA WRAPPER wrapper_name
    OPTIONS (option [, option] ...)

option:
  { HOST character-literal
  | DATABASE character-literal
  | USER character-literal
  | PASSWORD character-literal
  | SOCKET character-literal
  | OWNER character-literal
  | PORT numeric-literal }

With this change we have:

option:
  { HOST character-literal
  | DATABASE character-literal
  | USER character-literal
  | PASSWORD character-literal
  | SOCKET character-literal
  | OWNER character-literal
  | PORT numeric-literal
  | PORT quoted-numerical-literal
  | identifier character-literal}

We store these options as a JSON field in the mysql.servers system
table. We retain the restriction that PORT needs to be a number, but
also allow it to be a quoted number, so that SHOW CREATE SERVER can be
used for dumping. Without an accompanied implementation of SHOW CREATE
SERVER, some mysqldump tests will fail. Therefore this commit should
be immediately followed by the one implementating SHOW CREATE SERVER,
with testing covering both.
2024-10-15 10:50:22 +11:00
Yuchen Pei
2345407b8c
MDEV-34716 Fix mysql.servers socket max length too short
The limit of socket length on unix according to libc is 108, see
sockaddr_un::sun_path, but in the table it is a string of max length
64, which results in truncation of socket and failure to connect by
plugins using servers such as spider.
2024-10-15 10:50:22 +11:00
Marko Mäkelä
43465352b9 Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00
Marko Mäkelä
b53b81e937 Merge 11.2 into 11.4 2024-10-03 14:32:14 +03:00
Yuchen Pei
ba7088d462
Merge '11.4' into 11.6 2024-10-03 15:59:20 +10:00
Julius Goryavsky
68e968bc98 MDEV-30822: Adjust wsrep_sst_mariabackup.sh to understand both pre-MDEV-18931 and post-MDEV-18931 file naming
This commit adds support for legacy names for files such
as mariadb_backup_galera_info, mariadb_backup_checkpoints
and mariabackup_binlog_info to allow upgrading from old
to new server versions without stopping the galera cluster.
2024-09-19 11:15:38 +02:00
Marko Mäkelä
7ea9e1358f Merge 11.2 into 11.4 2024-09-18 08:07:22 +03:00
Marko Mäkelä
e782e416ac Merge 10.11 into 11.2 2024-09-18 07:38:49 +03:00
Julius Goryavsky
f176248d4b Merge branch '10.6' into '10.11' 2024-09-17 06:23:10 +02:00
Julius Goryavsky
80fff4c6b1 Merge branch '10.5' into '10.6' 2024-09-16 16:39:59 +02:00
Julius Goryavsky
222744c54e galera SST scripts: fixing glitchy sockstat issues for FreeBSD 2024-09-16 14:54:47 +02:00
Julius Goryavsky
64356509af galera SST scripts: moving mysqldump-specific code out of the wsrep_sst_common 2024-09-15 06:08:03 +02:00
Julius Goryavsky
228cb073ad galera SST scripts: comments update 2024-09-15 06:08:03 +02:00
Julius Goryavsky
46a5d2f1cf galera SST scripts: unification of the previous SST completion check 2024-09-15 06:08:03 +02:00
Julius Goryavsky
7742cc9ff9 galera SST scripts: more robust port checking 2024-09-15 06:07:56 +02:00
Julius Goryavsky
642195d255 MDEV-34234: SST hangs when running on unprivileged containers on RHEL9
The lsof utility is prone to blocking on system calls that
it uses to obtain information about sockets (or files, devices,
etc.). This behavior is described in its own documentation.
It has a '-b' option (in combination with warnings suppression
via '-w') that reduces the probability of blocking, introducing
new problems (luckily probably not relevant for our use case).
However, there is no guarantee that it will not hang on some
distributions, with some TCP/IP stack implementations, or with
some filesystems, etc. Also, of the three utilities that are
suitable for our purposes, lsof is the slowest. So if there
are other utilities that we use during SST, such as 'ss' or
'sockstat', it is reasonable to use them instead of lsof.
This commit changes the prioritization of utilities, it does
not need additional tests (besides the numerous SST tests
already available in the galera suites). If the system still
need to use lsof, this commit adds the '-b' and '-w' options
to it command line - to reduce the likelihood of blocking.
2024-09-15 05:05:03 +02:00
Julius Goryavsky
202fd502cf galera SST scripts: fixes for error logging in non-linux systems 2024-09-15 05:05:03 +02:00
Julius Goryavsky
606c867e7f galera SST scripts: moving common code to wsrep_sst_common file 2024-09-15 05:05:03 +02:00
Julius Goryavsky
4cb73f49bc galera SST scripts: unification of wsrep_sst_backup with the other scripts 2024-09-15 05:05:03 +02:00
Julius Goryavsky
fbd8829149 galera SST scripts: removing obsolete xtrabackup_pid support
Removed handling of the long-unsupported xtrabackup_pid file,
as it is not even created by modern versions of mariabackup.
Instead, added stopping of the asynchronous process that
mariabackup runs (if it is still active) to the exception
handler.
2024-09-15 05:05:03 +02:00
Julius Goryavsky
5cb436e07b MDEV-30822 preparation: refactoring galera sst scripts
This commit makes the SST script for mariabackup more
resilient to unexpected terminations or hangs while
mariabackup or when SST scripts in a previous session
are still running (in reality they were hung while
waiting for something).
2024-09-15 05:05:03 +02:00
Marko Mäkelä
762ad01c7f Merge 11.2 into 11.4 2024-09-13 13:09:23 +03:00
Marko Mäkelä
f0de610d0c Merge 10.11 into 11.2 2024-09-10 18:35:16 +03:00
Sergei Petrunia
2c3b298337 Merge 11.2 into 11.4 2024-09-09 14:40:02 +03:00
Sergei Petrunia
abd98336d2 Merge 10.11 -> 11.2 2024-09-09 13:50:38 +03:00
Marko Mäkelä
f9f92b480e Merge 10.6 into 10.11 2024-09-06 16:17:42 +03:00