mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-34705: Binlog in Engine: Searchability for GTID position
Every N bytes (hardcoded at 64k for now, to become a configurable setting), write the binlog GTID state into the binlog tablespace. This allows to quickly find a given GTID position by binary search to the prior GTID state in the tablespace and then a small linear scan from that point. The full binlog state is dumped at the start of the binlog file; remaining states dumped are differential states containing only the changed (domain_id, server_id) pairs, to save space if binlog space is large. This commit only implements the writing of the binlog state to the tablespace at regular intervals. The binary search to be implemented in a subsequent commit. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@@ -60,6 +60,7 @@ class Field_blob;
|
||||
class Column_definition;
|
||||
class select_result;
|
||||
class handler_binlog_reader;
|
||||
struct rpl_gtid;
|
||||
|
||||
// the following is for checking tables
|
||||
|
||||
@@ -1531,7 +1532,8 @@ struct handlerton
|
||||
|
||||
/* Optional implementation of binlog in the engine. */
|
||||
bool (*binlog_init)(size_t binlog_size);
|
||||
bool (*binlog_write_direct)(IO_CACHE *cache, size_t main_size);
|
||||
bool (*binlog_write_direct)(IO_CACHE *cache, size_t main_size,
|
||||
const rpl_gtid *gtid);
|
||||
handler_binlog_reader * (*get_binlog_reader)();
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user