Stale data in INFORMATION_SCHEMA.INNODB_LOCKS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
In Progress
|
High
|
Kristian Nielsen | ||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Alexey Kopytov |
Bug Description
This is MySQL Bug#48883 (http://
The XtraDB INFORMATION_
procedure. First, a table cache is filled with the real information, under the
kernel_mutex. This is only done if at least 100 milliseconds has passed since
last filling the cache. Second, the MySQL table data is populated from the
cache, which may thus be up to 100 milliseconds old.
There is a bug in the accounting for how often to do the first step. The
timestamp for last update is updated in step 2, not in step 1. This has two
consequences:
1. If the INNODB_PLUGIN table is queried very frequently repeatedly (with less
than 100 milliseconds interval in-between), stale data can be returned
indefinitely, as the "last updated" timestamp is reset even though step 1 is
not run. This is the problem seen in Bug#48883, and in MariaDB Buildbot.
2. If multiple queries against INNODB_PLUGIN start at around the same time,
they can _all_ cause the cache to be updated, as the "last updated" timestamp
is not reset immediately after updating the cache. This can cause extra
unnecessary contention on kernel_mutex.
The failure is easy to repeat by changing the sleep in
mysql-test/
the innodb_
I will attach a patch that fixes it.
Related branches
- Vadim Tkachenko: Approve
- Fred Linhoss (community): Approve (documentation)
-
Diff: 151 lines (+139/-0)2 files modifiedbug677407.patch (+138/-0)
series (+1/-0)
Changed in percona-server: | |
assignee: | nobody → Alexey Kopytov (akopytov) |
Changed in percona-server: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in percona-server: | |
milestone: | none → 5.1.53-11.7 |
Changed in percona-server: | |
status: | Confirmed → In Progress |
Changed in maria: | |
milestone: | none → 5.1 |
Changed in maria: | |
status: | Fix Committed → In Progress |
Changed in percona-server: | |
status: | Fix Committed → Fix Released |
Patch for the problem, including BSD license for Percona for inclusion into Percona-Server.
Percona developers, please check the patch and consider it for inclusion (or let me
know if you see any problem with the patch).
I have committed the fix to XtraDB in MariaDB.