mariadb/storage
Marko Mäkelä 582545a384 MDEV-13637 InnoDB change buffer housekeeping can cause redo log overrun and possibly deadlocks
The function ibuf_remove_free_page() may be called while the caller
is holding several mutexes or rw-locks. Because of this, this
housekeeping loop may cause performance glitches for operations that
involve tables that are stored in the InnoDB system tablespace.
Also deadlocks might be possible.

The worst impact of all is that due to the mutexes being held, calls to
log_free_check() had to be skipped during this housekeeping.
This means that the cyclic InnoDB redo log may be overwritten.
If the system crashes during this, it would be unable to recover.

The entry point to the problematic code is ibuf_free_excess_pages().
It would make sense to call it before acquiring any mutexes or rw-locks,
in any 'pessimistic' operation that involves the system tablespace.

fseg_create_general(), fseg_alloc_free_page_general(): Do not call
ibuf_free_excess_pages() while potentially holding some latches.

ibuf_remove_free_page(): Do call log_free_check(), like every operation
that is about to generate redo log should do.

ibuf_free_excess_pages(): Remove some assertions that are replaced
by stricter assertions in the log_free_check() that is now called by
ibuf_remove_free_page().

row_ins_sec_index_entry(), row_undo_ins_remove_sec_low(),
row_undo_mod_del_mark_or_remove_sec_low(),
row_undo_mod_del_unmark_sec_and_undo_update(): Call
ibuf_free_excess_pages() if the operation may involve allocating pages
and change buffering in the system tablespace.
2017-08-25 14:01:51 +03:00
..
archive Merge branch '5.5' into 10.0 2017-07-06 23:47:33 +02:00
blackhole
cassandra MDEV-6662: possible bug in cassandra_se.cc 2015-12-10 02:28:41 +03:00
connect CONNECT engine: install ha_connect.lib 2017-08-23 23:30:51 +00:00
csv MDEV-6262 analyze the coverity report on mariadb 2017-05-19 20:26:56 +02:00
example
federated MDEV-12824 GCC 7 warning: this statement may fall through [-Wimplicit-fallthrough=] 2017-07-20 20:13:28 +02:00
federatedx MDEV-12824 GCC 7 warning: this statement may fall through [-Wimplicit-fallthrough=] 2017-07-20 20:13:28 +02:00
heap MDEV-12824 GCC 7 warning: this statement may fall through [-Wimplicit-fallthrough=] 2017-07-20 20:13:28 +02:00
innobase MDEV-13637 InnoDB change buffer housekeeping can cause redo log overrun and possibly deadlocks 2017-08-25 14:01:51 +03:00
maria Merge remote-tracking branch 'origin/5.5' into 10.0 2017-07-25 00:41:54 +03:00
mroonga Merge branch '5.5' into 10.0 2017-07-06 23:47:33 +02:00
myisam Merge remote-tracking branch 'origin/5.5' into 10.0 2017-07-25 00:41:54 +03:00
myisammrg MDEV-12915 ST_Centroid does not return the same result than MySQL 2017-08-01 09:52:59 +02:00
ndb Fix spelling: occurred, execute, which etc 2016-03-04 02:09:37 +02:00
oqgraph Fixed test failing as myisam table was deleted before oqgraph table. 2017-02-28 16:10:47 +01:00
perfschema Revert "Fix unit test after merge from mysql 5.5.35 perfschema" 2017-05-17 12:13:09 +03:00
sequence
sphinx MDEV-5477 sphinxSE GROUP BY on multiple attributes 2017-05-16 12:42:53 +02:00
spider Merge branch '5.5' into 10.0 2017-07-06 23:47:33 +02:00
test_sql_discovery
tokudb Merge branch 'bb-10.0-vicentiu' into 10.0 2017-08-04 09:32:40 +02:00
xtradb MDEV-13637 InnoDB change buffer housekeeping can cause redo log overrun and possibly deadlocks 2017-08-25 14:01:51 +03:00