Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Upstream MyRocks has this patch:
commit 0f402cb8381ba9d8e71c93085a22e5a12589b6e3
|
Author: Santosh Praneeth Banda <santoshb@fb.com>
|
Date: Thu Nov 5 13:54:45 2015 -0800
|
|
Improve singled thread replication performance
|
|
Summary:
|
On slave we update the slave_gtid_info table through MySQL. Delegate this
|
to storage engine which is more efficient. SQL threads updates the row information
|
in THD structure. Storag engines (InnoDB and Rocksdb) uses this information and
|
updates the slave_gtid_info table during prepare phase.
|
For the user, the server has a global @@slave_gtid_info variable. Possible values are ON, OFF, OPTIMIZED. OPTIMIZED only works for MyRocks and means that the storage engine takes care of maintaining the mysql.slave_gtid_info table.
ha_rocksdb.cc has code that manually updates slave_gtid_info to reflect the binlog position.
MariaDB's equivalent of slave_gtid_info is called gtid_slave_pos.
MariaDB currently doesn't have the SQL part of this feature. We could port it, but
- it may be hard to put something like this into MariaDB 10.2
- this does not seem like a priority task?
See also: MDEV-12179, per-engine gtid_slave_pos. It is only in MariaDB-10.3, though.
Attachments
Issue Links
- relates to
-
MDEV-9658 Make MyRocks in MariaDB stable
-
- Closed
-
A stack trace of MariaDB slave updating gtid_slave_pos:
#1 0x0000555555d874c3 in handler::ha_write_row (this=0x7fff78011ed8, buf=0x7fff78014cd8 "\377") at /home/psergey/dev-git/10.2-mariarocks/sql/handler.cc:5995
#2 0x0000555555cba2c4 in rpl_slave_state::record_gtid (this=0x555557937ee0, thd=0x7fff64001550, gtid=0x7ffff41e7ba0, sub_id=4, in_transaction=true, in_statement=false) at /home/psergey/dev-git/10.2-mariarocks/sql/rpl_gtid.cc:579
#3 0x0000555555ea3799 in Xid_log_event::do_apply_event (this=0x7fff64017250, rgi=0x7fff64000a90) at /home/psergey/dev-git/10.2-mariarocks/sql/log_event.cc:8412
#4 0x0000555555a62223 in Log_event::apply_event (this=0x7fff64017250, rgi=0x7fff64000a90) at /home/psergey/dev-git/10.2-mariarocks/sql/log_event.h:1452
#5 0x0000555555a571ff in apply_event_and_update_pos_apply (ev=0x7fff64017250, thd=0x7fff64001550, rgi=0x7fff64000a90, reason=0) at /home/psergey/dev-git/10.2-mariarocks/sql/slave.cc:3571
#6 0x0000555555a57738 in apply_event_and_update_pos (ev=0x7fff64017250, thd=0x7fff64001550, rgi=0x7fff64000a90) at /home/psergey/dev-git/10.2-mariarocks/sql/slave.cc:3719
#7 0x0000555555a57f4e in exec_relay_log_event (thd=0x7fff64001550, rli=0x555558725e98, serial_rgi=0x7fff64000a90) at /home/psergey/dev-git/10.2-mariarocks/sql/slave.cc:4009
#8 0x0000555555a5b47a in handle_slave_sql (arg=0x5555587241d0) at /home/psergey/dev-git/10.2-mariarocks/sql/slave.cc:5148