applier time value can be negative

Bug #882711 reported by Seppo Jaakola
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Invalid
Low
Unassigned
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Invalid
Undecided
Unassigned
5.6
Invalid
Undecided
Unassigned

Bug Description

Following has been observed in processlists:

mysql> show processlist;

+--------+-------------+-----------------+------+---------+--------+-----------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |

+--------+-------------+-----------------+------+---------+--------+-----------------------+------------------+
| 13 | system user | | NULL | Sleep | -204 | post SQL applying (0) | NULL |
| 14 | system user | | NULL | Sleep | 240432 | wsrep aborter idle | NULL |
| 15 | system user | | NULL | Sleep | -204 | post SQL applying (0) | NULL |
| 16 | system user | | NULL | Sleep | -204 | post SQL applying (0) | NULL |
| 17 | system user | | NULL | Sleep | -204 | post SQL applying (0) | NULL |

Revision history for this message
shinguz (oli-sennhauser) wrote :
Download full text (4.3 KiB)

Same to me on 5.5.20 MySQL Community Server (GPL), wsrep_23.4.r3713, wsrep_23.4.r3713

Interestingly it happens only on 2 Galera nodes out of 3 and in an other state:

show processlist;
+------+-------------+--------------------+------+---------+------+--------------------+----------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+-------------+--------------------+------+---------+------+--------------------+----------------------------------------------------------+
| 1 | system user | | NULL | Sleep | 5283 | wsrep aborter idle | NULL |
| 2 | system user | | NULL | Query | 3 | committing 419838 | COMMIT |
| 1166 | root | localhost | NULL | Query | 0 | sleeping | show processlist |
| 1167 | app | 192.168.56.1:40884 | test | Query | 0 | query end | INSERT INTO test values (NULL, "Test data insert", NULL) |
| 2022 | app | 192.168.56.1:43648 | test | Query | 0 | query end | INSERT INTO test values (NULL, "Test data insert", NULL) |
| 6557 | app | 192.168.56.1:47964 | test | Query | 0 | query end | insert into test values (NULL, 'Test data insert', NULL) |
+------+-------------+--------------------+------+---------+------+--------------------+----------------------------------------------------------+

+------+-------------+--------------------+------+---------+------+--------------------------+----------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+-------------+--------------------+------+---------+------+--------------------------+----------------------------------------------------------+
| 1 | system user | | NULL | Sleep | -8 | applied write set 420218 | NULL |
| 2 | system user | | NULL | Sleep | 5234 | wsrep aborter idle | NULL |
| 1373 | root | localhost | NULL | Query | 0 | sleeping | show processlist |
| 1374 | app | 192.168.56.1:44662 | test | Query | 0 | query end | INSERT INTO test values (NULL, "Test data insert", NULL) |
| 7091 | app | 192.168.56.1:52785 | test | Query | 0 | query end | insert into test values (NULL, 'Test data insert', NULL) |
+------+-------------+--------------------+------+---------+------+--------------------------+----------------------------------------------------------+

+------+-------------+--------------------+------+---------+------+--------------------------+----------------------------------------------------...

Read more...

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

IIRC, this is due to poor time sychronization between nodes and is not wsrep-related at all. We probably should invalidate this bug. NTP to the rescue.

Changed in codership-mysql:
milestone: 5.5.33-24.8 → none
Revision history for this message
Przemek (pmalkowski) wrote :

When all the nodes are in sync in terms of system time, this never happens. Also a situation where some nodes are in different timezone then others works just well and applier times are never negative, so time zone differences are handled correctly.
Only when there is time synchronization issue between the nodes, applier threads may report negative or too advance time since last event was applied, depending on actual time difference.
In my opinion there is nothing wrong in wsrep as it must rely on system clock. It is enough to use ntp daemon or ntpdate to deal with this.

no longer affects: codership-mysql/5.5
Changed in codership-mysql:
status: New → Invalid
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-1194

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.