[MDEV-21338] wsrep_sync_wait_upto_gtid not affecting the existing client session Created: 2019-12-17  Updated: 2022-03-29

Status: Open
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.4.10
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Sri sakthivel Assignee: Seppo Jaakola
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Galera Cluster



 Description   

Hi ,

I have tested the function wsrep_sync_wait_upto_gtid with MariaDB version 10.4.11 . The function wsrep_sync_wait_upto_gtid is not affecting the existing client session . But, it is working as expected with the new sessions . Is that the expected behaviour . I have attached the screen shot for the better understanding .

MariaDB [test_fun]> insert into fun_gtid (id) values (26); 
Query OK, 1 row affected (0.241 sec)
 
MariaDB [test_fun]> select * from fun_gtid limit 1;
+------+
| id   |
+------+
|    1 |
+------+
1 row in set (0.624 sec)
 
MariaDB [test_fun]> pager grep -i 'update\|select'
PAGER set to 'grep -i 'update\|select''
MariaDB [test_fun]> show processlist;
| 14 | root        | localhost | test_fun | Query   |   28 | Executing                | select wsrep_sync_wait_upto_gtid('42e8c139-209a-11ea-a359-2bbb061b8859:2767',500) |    0.000 |
8 rows in set (0.187 sec)
 
MariaDB [test_fun]> show processlist;
| 14 | root        | localhost | test_fun | Query   |   32 | Executing                                  | select wsrep_sync_wait_upto_gtid('42e8c139-209a-11ea-a359-2bbb061b8859:2767',500) |    0.000 |
| 34 | system user |           | NULL     | Sleep   |    0 | Update_rows_log_event::ha_update_row(2767) | update sbtest1 set k = 10                                                         |    0.000 |
8 rows in set (0.170 sec)
 
MariaDB [test_fun]> \q  
Bye
[root@mydbopslabs22 mysql]# mysql
uWelcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 37
Server version: 10.4.11-MariaDB-log MariaDB Server
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
sType 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> use test_fun
^[[AReading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
MariaDB [test_fun]> insert into fun_gtid (id) values (26); 
ERROR 1047 (08S01): WSREP has not yet prepared node for application use
MariaDB [test_fun]> select * from fun_gtid limit 1;
ERROR 1047 (08S01): WSREP has not yet prepared node for application use
MariaDB [test_fun]> 



 Comments   
Comment by Sri Sakthivel (Inactive) [ 2019-12-20 ]

Hi ,

Can i have any updates on this behaviour ?

Comment by Ramesh Sivaraman [ 2022-03-29 ]

hercules7sakthi WSREP_SYNC_WAIT_UPTO_GTID function does not affect existing or new sessions, it only affects the function execution session.

node2:root@localhost> select now(); SELECT WSREP_SYNC_WAIT_UPTO_GTID('5097b343-af77-11ec-a5e1-f394f43d98ae:800000',200);
+---------------------+
| now()               |
+---------------------+
| 2022-03-29 19:20:01 |
+---------------------+
1 row in set (0.001 sec)

existing session

  
node2:root@localhost> select now();
+---------------------+
| now()               |
+---------------------+
| 2022-03-29 19:19:51 |
+---------------------+
1 row in set (0.000 sec)
 
node2:root@localhost> delete from sbtest1 limit 100;
Query OK, 100 rows affected (0.012 sec)
 
 
node2:root@localhost> 

new session

node2:root@localhost> select now();
+---------------------+
| now()               |
+---------------------+
| 2022-03-29 19:20:13 |
+---------------------+
1 row in set (0.000 sec)
 
node2:root@localhost> use test
Database changed
node2:root@localhost> delete from sbtest1 limit 100;
Query OK, 100 rows affected (0.011 sec)
 
node2:root@localhost> 
 
node2:root@localhost> select version();
+-----------------+
| version()       |
+-----------------+
| 10.4.25-MariaDB |
+-----------------+
1 row in set (0.000 sec)
 
node2:root@localhost>
 
| 10 | system user |           | NULL | Sleep   |    0 | Update_rows_log_event::ha_update_row(748855) | UPDATE sbtest6 SET k=k+1 WHERE id=?                                                 |    0.000 |
| 17 | root        | localhost | test | Query   |    0 | Init                                         | show processlist                                                                    |    0.000 |
| 21 | root        | localhost | NULL | Query   |   35 | Executing                                    | SELECT WSREP_SYNC_WAIT_UPTO_GTID('5097b343-af77-11ec-a5e1-f394f43d98ae:800000',200) |    0.000 

Generated at Thu Feb 08 09:06:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.