[MDEV-8364] wsrep_dirty_reads not possible with wsrep_sync_wait (deadlock) Created: 2015-06-23  Updated: 2015-10-14  Resolved: 2015-10-14

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.0.17-galera
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Ragnar Rova Assignee: Nirbhay Choubey (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

1. Three node galera cluster, with wsrep_sync_wait=1 in /etc/my.cnf
2. Kill two of three nodes
3. Connect to last node, try to enable dirty reads and select data from it. You get a lock wait timeout exception (1205). SET wsrep_sync_wait=0 gets you halfway but you still cannot access table data.

Server version: 10.0.17-MariaDB-wsrep-log
 
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> select 1;
ERROR 1047 (08S01): WSREP has not yet prepared node for application use
MariaDB [(none)]> set wsrep_dirty_reads=1;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> select 1;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
MariaDB [(none)]> set wsrep_sync_wait=0;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
 
MariaDB [(none)]> use mysql;
ERROR 1047 (08S01): WSREP has not yet prepared node for application use
MariaDB [(none)]> select @@global.wsrep_sync_wait;
+--------------------------+
| @@global.wsrep_sync_wait |
+--------------------------+
|                        1 |
+--------------------------+
1 row in set (0.00 sec)
 
MariaDB [(none)]> set @@global.wsrep_sync_wait=0;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> use mysql;
ERROR 1047 (08S01): WSREP has not yet prepared node for application use
 



 Comments   
Comment by Ragnar Rova [ 2015-06-23 ]

seems like if I only want to do selects, I can instead of wsrep_dirty_reads session-level variable wsrep_on?

like so:

-> select foo ...
<- ERROR 1047 (08S01): WSREP has not yet prepared node for application use
-> set wsrep_on=OFF; select foo...
<- ...
-> set wsrep_on=ON;

?

Comment by Ragnar Rova [ 2015-06-24 ]

Sorry, I think this is not a bug. If I remove 'use mysql' and instead do select * from mysql.user all works fine.

Comment by Ragnar Rova [ 2015-06-24 ]

@elenst: You may close this, I do not need to be able to use 'use' statements in this mode. Not a bug.

Generated at Thu Feb 08 07:26:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.