global.wsrep_causal_reads no longer honored

Bug #1361859 reported by Nirbhay Choubey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Committed
Undecided
Yan Zhang
5.6
Fix Released
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
Revision history for this message
Yan Zhang (yan.zhang) wrote :
Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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)

Revision history for this message
Yan Zhang (yan.zhang) wrote :

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

Revision history for this message
Yan Zhang (yan.zhang) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.