mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-34705: Binlog-in-engine: Binlog reader to read whole page at a time
Instead of returning only one chunk at a time, make ha_innodb_binlog_reader::read_data() try to read all chunks on the page. This reduces the number of times each reader has to latch pages in the page fifo, which contends for a global mutex also shared with the writer. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@@ -4883,6 +4883,8 @@ show_engine_binlog_events(THD* thd, Protocol *protocol, LEX_MASTER_INFO *lex_mi)
|
||||
err= true;
|
||||
goto end;
|
||||
}
|
||||
/* The engine reader will stop at the end of the requested file. */
|
||||
reader->enable_single_file();
|
||||
|
||||
{
|
||||
SELECT_LEX_UNIT *unit= &thd->lex->unit;
|
||||
@@ -4894,9 +4896,7 @@ show_engine_binlog_events(THD* thd, Protocol *protocol, LEX_MASTER_INFO *lex_mi)
|
||||
char name_buf[FN_REFLEN];
|
||||
opt_binlog_engine_hton->get_filename(name_buf, file_no);
|
||||
|
||||
for (ha_rows event_count= 0;
|
||||
reader->cur_file_no == file_no && event_count < limit;
|
||||
++event_count)
|
||||
for (ha_rows event_count= 0; event_count < limit; ++event_count)
|
||||
{
|
||||
packet.length(0);
|
||||
int reader_error= reader->read_log_event(&packet, 0,
|
||||
|
Reference in New Issue
Block a user