This is a top-level task for the project of designing a new set of replication APIs for MariaDB. This task is for the initial discussion of what to do and where to focus. The project is started in this email thread: https://lists.launchpad.net/maria-developers/msg01998.html Wiki page for the project: http://askmonty.org/wiki/ReplicationProject The following sub-parts of the project are identified: 1. Event generator API: MWL#120 2. Event applier API: MWL#133 3. TC plugin: MWL#132 4. Materialisation of events (allowing plugins to transport/store events as opaque entities, without understanding of the internals).
Current ideas/status after discussions on the mailing list: - Implement a set of plugin APIs and use them to move all of the existing MySQL replication into a (set of) plugins. - Design the APIs so that they can support full MySQL replication, but also so that they do not hardcode assumptions about how this replication implementation is done, and so that they will be suitable for other types of replication (Tungsten, Galera, parallel replication, ...). - APIs need to include the concept of a global transaction ID. Need to determine the extent to which the semantics of such ID will be defined by the API, and to which extend it will be defined by the plugin implementations. - APIs should properly support reliable crash-recovery with decent performance (eg. not require multiple mandatory fsync()s per commit, and not make group commit impossible). - Would be nice if the API provided facilities for implementing good consistency checking support (mainly checking master tables against slave tables is hard here I think, but also applying wrong binlog data and individual event checksums). Steps to make this more concrete: - Investigate the current MySQL replication, and list all of the places where a plugin implementation will need to connect/hook into the MySQL server. * handler::{write,update,delete}_row() * Statement execution * Transaction start/commit * Table open * Query safe/not/safe for statement based replication * Statement-based logging details (user variables, random seed, etc.) * ... - Use this list to make an initial sketch of the set of APIs we need. - Use the list to determine the feasibility of this project and the level of detail in the API needed to support a full replication implementation as a plugin.
High Level Description modified. --- /tmp/wklog.107.old.8531 2010-09-07 11:34:46.000000000 +0000 +++ /tmp/wklog.107.new.8531 2010-09-07 11:34:46.000000000 +0000 @@ -14,7 +14,7 @@ The following sub-parts of the project are identified: -1. Event generator API: MWL#116 +1. Event generator API: MWL#120 2. Event applier API: MWL#133
High Level Description modified. --- /tmp/wklog.107.old.32235 2010-08-27 13:20:54.000000000 +0000 +++ /tmp/wklog.107.new.32235 2010-08-27 13:20:54.000000000 +0000 @@ -16,8 +16,7 @@ 1. Event generator API: MWL#116 -2. Event applier API, allowing a plugin to apply/execute an event (eg. on a - slave) [1]. +2. Event applier API: MWL#133 3. TC plugin: MWL#132 @@ -25,7 +24,4 @@ as opaque entities, without understanding of the internals). -[1] Applier API is described briefly here: -http://kristiannielsen.livejournal.com/13382.html -
Dependency created: WL#107 now depends on WL#133
High Level Description modified. --- /tmp/wklog.107.old.16163 2010-08-25 12:19:31.000000000 +0000 +++ /tmp/wklog.107.new.16163 2010-08-25 12:19:31.000000000 +0000 @@ -11,3 +11,21 @@ http://askmonty.org/wiki/ReplicationProject + +The following sub-parts of the project are identified: + +1. Event generator API: MWL#116 + +2. Event applier API, allowing a plugin to apply/execute an event (eg. on a + slave) [1]. + +3. TC plugin: MWL#132 + +4. Materialisation of events (allowing plugins to transport/store events + as opaque entities, without understanding of the internals). + + +[1] Applier API is described briefly here: +http://kristiannielsen.livejournal.com/13382.html + +
Dependency created: WL#107 now depends on WL#132
Status updated. --- /tmp/wklog.107.old.31164 2010-06-29 13:50:15.000000000 +0000 +++ /tmp/wklog.107.new.31164 2010-06-29 13:50:15.000000000 +0000 @@ -1 +1 @@ -Un-Assigned +In-Progress
Dependency created: WL#107 now depends on WL#120
Research and design thoughts.
High Level Description modified. --- /tmp/wklog.107.old.31097 2010-06-07 12:11:57.000000000 +0000 +++ /tmp/wklog.107.new.31097 2010-06-07 12:11:57.000000000 +0000 @@ -7,3 +7,6 @@ https://lists.launchpad.net/maria-developers/msg01998.html +Wiki page for the project: + + http://askmonty.org/wiki/ReplicationProject
Research and design discussions: Galera, 2pc/XA, group commit, multi-engine transactions.