Commit graph

23 commits

Author SHA1 Message Date
Jan Lindström
5017c261d4 Fix test failure on test MW-86 and remove MW-360 test.
Merged from mysql-wsrep-bugs following:

GCF-1058 MTR test galera.MW-86 fails on repeated runs
Wait for the sync point sync.wsrep_apply_cb to be reached before
executing the test and clearing the debug flag sync.wsrep_apply_cb.

The race scenario:

Intended behavior:
node2: set sync.wsrep_apply_cb in order to start waiting in the background INSERT
node1: INSERT start
node2 (background): INSERT start
node1: INSERT end
node2: send signal to background INSERT: "stop waiting and continue executing"
node2: clear sync.wsrep_apply_cb as no longer needed
node2 (background): consume the signal
node2 (background): INSERT end
node2: DROP TABLE
node2: check no pending signals are left - ok

What happens occasionally (unexpected):
node2: set sync.wsrep_apply_cb in order to start waiting in the background INSERT
node1: INSERT start
node2 (background): INSERT start
node1: INSERT end
// The background INSERT still has _not_ reached the place where it starts
// waiting for the signal:
// DBUG_EXECUTE_IF("sync.wsrep_apply_cb", "now wait_for...");
node2: send signal to background INSERT: "stop waiting and continue executing"
node2: clear sync.wsrep_apply_cb as no longer needed
// The background INSERT reaches DBUG_EXECUTE_IF("sync.wsrep_apply_cb", ...)
// but sync.wsrep_apply_cb has already been cleared and the "wait" code is not
// executed. The signal remains unconsumed.
node2 (background): INSERT end
node2: DROP TABLE
node2: check no pending signals are left - failure, signal.wsrep_apply_cb is
pending (not consumed)

Remove MW-360 test case as it is not intended for MariaDB (uses
MySQL GTID).
2017-08-15 13:57:15 +03:00
Daniele Sciascia
77f5b188d3 MW-357 Reset thd->wsrep_apply_toi regardless of applier exiting
Applier does not reset thd->wsrep_apply_toi if applier thread decides
to exit by setting 'exit= true'. The problem is that galera side may
decide not to kill the applier thread: for instance if we try to
SET wsrep_slave_threads = 0; then galera refuses to kill the last
applier thread. If this happens we are left with a thd which has not
been reset to the initial state.
This patch ensures that the thd is reset regardless of the applier
thread exiting or not.
2017-08-11 12:17:22 +03:00
Daniele Sciascia
74f80b3499 MW-267 Enforce wsrep_max_ws_size limit in wsrep provider
This changes variable wsrep_max_ws_size so that its value
is linked to the value of provider option repl.max_ws_size.
That is, changing the value of variable wsrep_max_ws_size
will change the value of provider option repl.max_ws_size,
and viceversa.
The writeset size limit is always enforced in the provider,
regardless of which option is used.
2016-07-25 11:44:57 -04:00
Nirbhay Choubey
276d65b324 Fix for test failures. 2016-02-23 20:33:21 -05:00
Daniele Sciascia
267d429b5a refs codership/mysql-wsrep#31
- Erronously removed call to wsrep_xid_init() in previous commit.
2016-02-22 16:22:50 -05:00
Daniele Sciascia
c0dac420e5 refs codership/mysql-wsrep#31
- Removes useless call to wsrep_xid_init() in wsrep_apply_events().
  Transaction's xid is already initialized at that point.
- Adds call to wsrep_set_SE_checkpoint() for committing TOI events
  in the applier side.
- Includes test case that reproduced the issue.
2016-02-22 16:21:04 -05:00
Nirbhay Choubey
8c44fd63ac MDEV-8239 : Idle threads post-execution end up in closing tables state
Set thd's state to 'committed' only after it has done closing tables
(called indirectly by relay_group_info::cleanup_context()).
2015-06-19 00:17:25 -04:00
Alexey Yurchenko
4ed9ddd30e Refs codership/mysql-wsrep#33
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
Nirbhay Choubey
84a4db263a Merge branch '5.5-galera' into 10.0-galera 2015-03-28 17:29:10 -04:00
Nirbhay Choubey
d7445ea6df MDEV-7194: galera fails to replicate DDL queries when using binlog_checksum
Restore fix for MDEV-4328 (revno: 3391) that got accidentally
overwritten while merging :
http://bazaar.launchpad.net/~codership/codership-mysql/5.5-23/revision/3900

Added a test case.
2015-03-27 20:35:37 -04:00
Nirbhay Choubey
7a6cad5221 Backport fix for MDEV-7673, MDEV-7203 and MDEV-7192 from 10.0-galera 2015-03-11 12:36:00 -04:00
Nirbhay Choubey
c6acdf7c28 MDEV-7203: replicate_events_marked_for_skip didn't work on Galera cluster
OPTION_SKIP_REPLICATION flag needs to be preserved for events received
on non-originating nodes.
2015-03-06 13:19:49 -05:00
Nirbhay Choubey
9af42db613 MDEV-7192: binlog_annotate_row_events not completely compatible with galera
Annotate_rows event needs to be preserved until the last Rows event has
been applied because after it has been applied thd->query points to the
query stored inside this event.
2015-03-05 14:14:00 -05:00
Nirbhay Choubey
542968cf0a bzr merge -r4015..4026 codership/5.5 2014-10-09 18:28:14 -04:00
Nirbhay Choubey
9a57de86be bzr merge -r4123..4144 codership/5.6 2014-09-30 18:06:15 -04:00
Nirbhay Choubey
4788577c20 bzr merge -r3997..4010 codership-mysql/5.5 2014-08-06 15:45:53 -04:00
Nirbhay Choubey
97779a2ef0 bzr merge -r4091..4101 codership/5.6/ 2014-06-19 18:48:20 -04:00
Nirbhay Choubey
0b98d2fd2a bzr merge -r4065..4088 codership/5.6 2014-05-21 17:07:17 -04:00
Nirbhay Choubey
4a6be51f78 * Merged revisions: 3431, 3435..3457, 3459, 3460 from maria-5.5-galera.
* Fixed Debian/Ubuntu dist files.
* Fixed some compiler warnings.
2014-01-30 12:45:38 -05:00
Seppo Jaakola
caa1b783bd Fixed one compiler warning in wsrep_applier.cc 2014-01-17 13:55:09 +02:00
Seppo Jaakola
a8dbf680e6 Added missing files 2014-01-17 13:28:43 +02:00
Nirbhay Choubey
9d5c3731be Fixes for some compiler warnings. 2014-01-09 23:22:10 -05:00
Nirbhay Choubey
31eaa90a6e Merging revision 3839..3932 from codership-mysql/5.5. 2014-01-09 14:54:57 -05:00