tokudb table rows decrease to 0, table has 10m rows in it - no indexes being used on any query plan

Bug #1651844 reported by Ross E Carver
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.6
Fix Released
Critical
George Ormond Lorch III
5.7
Fix Released
Critical
George Ormond Lorch III

Bug Description

I think this is a bug relating to an earlier bug, or perhaps it was not actually fixed, so I'm re-submitting it as a new/existing bug. The earlier bug is:

It appears there is a google group discussion about this, but no official open bug here.

https://groups.google.com/forum/#!topic/percona-discussion/hjmx3snYX4A

Seems like a pretty critical problem since its causing huge lock contention on updates and query plans result in full table scans. Below is the behavior I'm seeing on a table which has a high number of updates. This is on: Server version: 5.7.16-10-log Percona Server (GPL), Release 10, Revision a0c7d0d

mysql> select TABLE_ROWS from information_schema.tables where table_name='lw_item_discovery';
+------------+
| TABLE_ROWS |
+------------+
| 0 |
+------------+
1 row in set (0.01 sec)

mysql> select count(*) from retail.lw_item_discovery;
+----------+
| count(*) |
+----------+
| 10174538 |
+----------+
1 row in set (3.33 sec)

mysql> set session tokudb_analyze_mode=TOKUDB_ANALYZE_RECOUNT_ROWS;
Query OK, 0 rows affected (0.00 sec)

mysql> analyze table retail.lw_item_discovery;
+--------------------------+---------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+--------------------------+---------+----------+----------+
| retail.lw_item_discovery | analyze | status | OK |
+--------------------------+---------+----------+----------+
1 row in set (0.01 sec)

mysql> select TABLE_ROWS from information_schema.tables where table_name='lw_item_discovery';
+------------+
| TABLE_ROWS |
+------------+
| 0 |
+------------+
1 row in set (0.00 sec)

mysql> set session tokudb_analyze_mode=TOKUDB_ANALYZE_RECOUNT_ROWS;
Query OK, 0 rows affected (0.00 sec)

mysql> analyze table retail.lw_item_discovery;
+--------------------------+---------+----------+------------------+
| Table | Op | Msg_type | Msg_text |
+--------------------------+---------+----------+------------------+
| retail.lw_item_discovery | analyze | status | Operation failed |
+--------------------------+---------+----------+------------------+
1 row in set (0.01 sec)

Tags: tokudb count row
Revision history for this message
George Ormond Lorch III (gl-az) wrote :
Revision history for this message
Sly Ripper (sly-ripper) wrote :

This still isn't fixed in 5.6.35-80.0-1.jessie, it's happening with 'updates' and 'on duplicate key updates'.

A table with 3,020,666 rows reported 2,799,582 yesterday and 2,662,729 today.

TOKUDB_ANALYZE_RECOUNT_ROWS is a temporary fix.

Revision history for this message
Phil Sweeney (3-launchpa9-9) wrote :

I'm also still seeing this in MariaDB 10.1.22 (which includes TokuDB 5.6.35-80.0)

Revision history for this message
jocelyn fournier (joce) wrote :

I confirm I have the problem with 5.6.35-80.0 (perhaps a regression, I don't remind having issue with earlier versions including FT-732 fix)

Revision history for this message
Phil Sweeney (3-launchpa9-9) wrote :

For those still having issues, please be aware some further row count fixes are due soon via https://jira.percona.com/browse/TDB-2

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/PS-398

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.