1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-19 09:42:06 +03:00
Commit Graph

28 Commits

Author SHA1 Message Date
277968aa4c MDEV-31413 : Node has been dropped from the cluster on Startup / Shutdown with async replica
There was two related problems:

(1) Galera node that is defined as a slave to async MariaDB
master at restart might do SST (state stransfer) and
part of that it will copy mysql.gtid_slave_pos table.
Problem is that updates on that table are not replicated
on a cluster. Therefore, table from donor that is not
slave is copied and joiner looses gtid position it was
and start executing events from wrong position of the binlog.
This incorrect position could break replication and
causes node to be dropped and requiring user action.

(2) Slave sql thread might start executing events before
galera is ready (wsrep_ready=ON) and that could also
cause node to be dropped from the cluster.

In this fix we enable replication of mysql.gtid_slave_pos
table on a cluster. In this way all nodes in a cluster
will know gtid slave position and even after SST joiner
knows correct gtid position to start.

Furthermore, we wait galera to be ready before slave
sql thread executes any events to prevent too early
execution.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2023-08-08 03:25:56 +02:00
2917bd0d2c Reduce compilation dependencies on wsrep_mysqld.h
Making changes to wsrep_mysqld.h causes large parts of server code to
be recompiled. The reason is that wsrep_mysqld.h is included by
sql_class.h, even tough very little of wsrep_mysqld.h is needed in
sql_class.h. This commit introduces a new header file, wsrep_on.h,
which is meant to be included from sql_class.h, and contains only
macros and variable declarations used to determine whether wsrep is
enabled.
Also, header wsrep.h should only contain definitions that are also
used outside of sql/. Therefore, move WSREP_TO_ISOLATION* and
WSREP_SYNC_WAIT macros to wsrep_mysqld.h.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-08-31 11:05:23 +03:00
be5fce16a0 MDEV-24596 : Assertion `state_ == s_exec || state_ == s_quitting' failed in wsrep::client_state::disable_streaming
There were multiple problems here
* wsrep_trx_fragment_size should not be set when wsrep is disabled or provider is not loaded
* wsrep_trx_fragment_unit should not be set when wsrep is disabled or provider is not loaded
* wsrep_debug has no effect if wsrep is disabled or provider is not loaded
* wsrep_start_position should not be set when wsrep is disabled or provider is not loaded any other value than default
* wsrep_start_position should be changed only when we are joiner or initialized
* wsrep_start_position should be allowed to set only a value that exits, thus
we need to add error handling to wsrep_sst_complete
2021-01-21 11:41:29 +02:00
c07325f932 Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
36a2a185fe Galera4 2019-01-23 15:30:00 +04:00
b942aa34c1 Merge branch '10.1' into 10.2 2018-06-21 23:47:39 +02:00
6e55236c0a Merge branch '10.0-galera' into 10.1 2018-06-12 19:39:37 +03:00
648cf7176c Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera 2018-05-07 13:49:14 +03:00
86d31ce9f1 MW-384 protect access to wsrep_ready variable with mutex 2017-10-19 09:34:09 +03:00
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
09d902d84b MDEV-9618 solaris sparc build fails on 10.1.
Compiler on Sparc is strict about the 'const' modifiers
    in function declarations and definitions. Meaning
    they should be exactly same.
2016-06-27 18:02:28 +04:00
de7eafc7ce MDEV-6368: assertion xid_seqno > trx_sys_cur_xid_seqno
- Validate the specified wsrep_start_position value by also
checking the return status of wsrep->sst_received. This also
ensures that changes in wsrep_start_position is not allowed
when the node is not in JOINING state.
- Do not allow decrease in seqno within same UUID.
- The initial checkpoint in SEs should be [0...:-1].
2016-05-31 20:37:00 -04:00
dced5146bd Merge branch '10.0-galera' into 10.1 2015-07-14 16:05:29 -04:00
4ed9ddd30e Refs
1. factored XID-related functions to a separate wsrep_xid.cc unit.
  2. refactored them to take refrences instead of pointers where appropriate
  3. implemented wsrep_get/set_SE_position to take wsrep_uuid_t and wsrep_seqno_t instead of XID
  4. call wsrep_set_SE_position() in wsrep_sst_received() to reinitialize SE checkpoint after SST was received, avoid assert() in setting code by first checking current position.
2015-05-08 17:41:06 -04:00
df4dd593f2 MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3879.

Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
2014-08-26 15:43:46 +03:00
31eaa90a6e Merging revision 3839..3932 from codership-mysql/5.5. 2014-01-09 14:54:57 -05:00
a2594e96f7 Merges from lp:codership-mysql/5.5 up to rev , this changes to wsrep API 2013-11-26 16:48:30 +02:00
2b4183f10b bzr merge -r3890..3891 lp:codership-mysql/5.5 2013-11-06 00:29:37 +02:00
ba3ff50ab2 Merge 10.0 to galera-10.0 2013-09-03 17:50:36 +03:00
9da9a242fa remerging wsrep files from lp:codership-mysql 2013-02-05 16:54:50 +02:00
e0c6a87b99 re-merging wsrep files from lp:codership-mysql 2013-02-05 15:48:54 +02:00
8e84b9e740 Merged in change sets 3772-3779 from lp:codership-mysql/5.5 2012-08-30 12:22:37 +03:00
ebfa24b1d2 References lp:1034621 - Merge up to mysql-5.5.25 level
merged codership-mysql/5.5 revisions: bzr diff -r3759..3767
   merged codership-mysql/5.5 revisions: bzr diff -r3768..3771
2012-08-09 01:47:21 +03:00
f96fd3f40f Added wsrep specific files 2012-04-26 13:09:06 +03:00