global.wsrep_causal_reads no longer honored

Bug #1361859 reported by Nirbhay Choubey on 2014-08-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Undecided
Yan Zhang
5.6
Undecided
Yan Zhang
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned
Nirbhay Choubey (nirbhay) wrote :

The bug is about session's wsrep_sync_wait value not inheriting the global value of wsrep_causal_reads during session initialization. The patch (#1) however, updates the global values on SET which IMO is redundant.

Yan Zhang (yan.zhang) wrote :

As description of 'wsrep_causal_reads' said: "(DEPRECATED) setting this variable is equivalent to setting wsrep_sync_wait READ flag". So we not only have to update session 'wsrep_sync_wait' if we update session 'wsrep_causal_reads', we have to do it to global variables too. And vice versa.

if we don't update global values, it will bring inconsistency and introduce confusion to users. For example, if we don't update global values, there would be scenario:
- global wsrep_causal_reads = 1
- global wsrep_sync_wait = 6
from wsrep_causal_reads, we DO expect causality check on READ stmt. However from wsrep_sync_wait, we DO NOT expect causality check on READ stmt.

Nirbhay Choubey (nirbhay) wrote :

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;
+----------------------+
| @@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)

Yan Zhang (yan.zhang) wrote :

oh. I have never thought that situation. Then your patch is also needed. I'll fix that. thank you.

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1721

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers