* Start a node with --wsrep_causal_reads=ON
* Check wsrep_sync_wait's value :
MariaDB [test]> select @@wsrep_causal_reads;
+----------------------+
| @@wsrep_causal_reads |
+----------------------+
| 1 |
+----------------------+
1 row in set (0.00 sec)
MariaDB [test]> select @@wsrep_sync_wait;
+-------------------+
| @@wsrep_sync_wait |
+-------------------+
| 0 | <------- should have been 1
+-------------------+
1 row in set (0.00 sec)
Ok. That justifies the patch.
Now consider this :
* Start a node with --wsrep_ causal_ reads=ON
* Check wsrep_sync_wait's value :
MariaDB [test]> select @@wsrep_ causal_ reads; ------- ------- --+ causal_ reads | ------- ------- --+ ------- ------- --+
+------
| @@wsrep_
+------
| 1 |
+------
1 row in set (0.00 sec)
MariaDB [test]> select @@wsrep_sync_wait; ------- ------+ ------- ------+ ------- ------+
+------
| @@wsrep_sync_wait |
+------
| 0 | <------- should have been 1
+------
1 row in set (0.00 sec)