1794.2.6
by Monty Taylor
Added initial doc trees for a couple of plugins so that documentation can |
1 |
Transaction Log
|
2 |
===============
|
|
3 |
||
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
4 |
The Drizzle Transaction Log contains a sequence of |
5 |
`Google Protocol Buffer <http://code.google.com/p/protobuf/>`_ |
|
1794.2.6
by Monty Taylor
Added initial doc trees for a couple of plugins so that documentation can |
6 |
messages that describe the transactions which have been run. |
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
7 |
|
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
8 |
Loading
|
9 |
-------
|
|
10 |
||
11 |
This plugin is loaded by default, but it may need to be configured. See |
|
12 |
the plugin's :ref:`transaction_log_configuration` and |
|
13 |
:ref:`transaction_log_variables`. |
|
14 |
||
15 |
To stop the plugin from loading by default, start :program:`drizzled` |
|
16 |
with::
|
|
17 |
||
18 |
--plugin-remove=transaction_log
|
|
19 |
||
20 |
.. seealso:: :doc:`/options` for more information about adding and removing plugins. |
|
21 |
||
22 |
.. _transaction_log_configuration: |
|
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
23 |
|
24 |
Configuration
|
|
25 |
-------------
|
|
26 |
||
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
27 |
These command line options configure the plugin when :program:`drizzled` |
28 |
is started. See :doc:`/configuration` for more information about specifying |
|
29 |
command line options. |
|
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
30 |
|
2210.1.1
by Andrew Hutchings
Add configuration option and database table domain processors |
31 |
.. program:: drizzled |
32 |
||
33 |
.. option:: --transaction-log.enable |
|
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
34 |
|
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
35 |
:Default: false
|
36 |
:Variable: :ref:`transaction_log_enable <transaction_log_enable>` |
|
37 |
||
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
38 |
Enable transaction log. |
39 |
||
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
40 |
.. option:: --transaction-log.enable-checksum |
41 |
||
42 |
:Default: false
|
|
43 |
:Variable: :ref:`transaction_log_enable_checksum <transaction_log_enable_checksum>` |
|
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
44 |
|
45 |
Enable CRC32 Checksumming of each written transaction log entry |
|
46 |
||
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
47 |
.. option:: --transaction-log.file ARG |
48 |
||
49 |
:Default: :file:`transaction.log` |
|
50 |
:Variable: :ref:`transaction_log_file <transaction_log_file>` |
|
51 |
||
52 |
Path to the file to use for transaction log. |
|
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
53 |
|
2210.1.1
by Andrew Hutchings
Add configuration option and database table domain processors |
54 |
.. option:: --transaction-log.flush-frequency=arg |
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
55 |
|
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
56 |
:Default: ``0`` |
57 |
:Variable: :ref:`transaction_log_flush_frequency <transaction_log_flush_frequency>` |
|
58 |
||
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
59 |
* 0 : rely on operating system to sync log file (default)
|
60 |
* 1 : sync file at each transaction write
|
|
61 |
* 2 : sync log file once per second
|
|
62 |
||
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
63 |
.. option:: --transaction-log.num-write-buffers ARG |
64 |
||
65 |
:Default: 8
|
|
66 |
:Variable: :ref:`transaction_log_num_write_buffers <transaction_log_num_write_buffers>` |
|
67 |
||
68 |
Number of slots for in-memory write buffers. |
|
69 |
||
70 |
.. option:: --transaction-log.truncate-debug |
|
71 |
||
72 |
:Default: false
|
|
73 |
:Variable: :ref:`transaction_log_truncate_debug <transaction_log_truncate_debug>` |
|
74 |
||
75 |
DEBUGGING - Truncate transaction log. |
|
76 |
||
77 |
.. option:: --transaction-log.use-replicator ARG |
|
78 |
||
79 |
:Default: ``default_replicator`` |
|
80 |
:Variable: :ref:`transaction_log_use_replicator <transaction_log_use_replicator>` |
|
81 |
||
82 |
Name of the replicator plugin to use. |
|
83 |
||
84 |
.. _transaction_log_variables: |
|
85 |
||
86 |
Variables
|
|
87 |
---------
|
|
88 |
||
89 |
These variables show the running configuration of the plugin. |
|
90 |
See `variables` for more information about querying and setting variables.
|
|
91 |
||
92 |
.. _transaction_log_enable: |
|
93 |
||
94 |
* ``transaction_log_enable`` |
|
95 |
||
96 |
:Scope: Global
|
|
97 |
:Dynamic: No
|
|
98 |
:Option: :option:`--transaction-log.enable` |
|
99 |
||
100 |
If the transaction log is enabled or not. |
|
101 |
||
102 |
.. _transaction_log_enable_checksum: |
|
103 |
||
104 |
* ``transaction_log_enable_checksum`` |
|
105 |
||
106 |
:Scope: Global
|
|
107 |
:Dynamic: No
|
|
108 |
:Option: :option:`--transaction-log.enable-checksum` |
|
109 |
||
110 |
Enable CRC32 Checksumming of each written transaction log entry |
|
111 |
||
112 |
.. _transaction_log_file: |
|
113 |
||
114 |
* ``transaction_log_file`` |
|
115 |
||
116 |
:Scope: Global
|
|
117 |
:Dynamic: No
|
|
118 |
:Option: :option:`--transaction-log.file` |
|
119 |
||
120 |
Path to the file to use for transaction log |
|
121 |
||
122 |
.. _transaction_log_flush_frequency: |
|
123 |
||
124 |
* ``transaction_log_flush_frequency`` |
|
125 |
||
126 |
:Scope: Global
|
|
127 |
:Dynamic: No
|
|
128 |
:Option: :option:`--transaction-log.flush-frequency` |
|
129 |
||
130 |
Flush frequency. |
|
131 |
||
132 |
.. _transaction_log_num_write_buffers: |
|
133 |
||
134 |
* ``transaction_log_num_write_buffers`` |
|
135 |
||
136 |
:Scope: Global
|
|
137 |
:Dynamic: No
|
|
138 |
:Option: :option:`--transaction-log.num-write-buffers` |
|
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
139 |
|
140 |
Number of slots for in-memory write buffers (default=8). |
|
141 |
||
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
142 |
.. _transaction_log_truncate_debug: |
143 |
||
144 |
* ``transaction_log_truncate_debug`` |
|
145 |
||
146 |
:Scope: Global
|
|
147 |
:Dynamic: No
|
|
148 |
:Option: :option:`--transaction-log.truncate-debug` |
|
149 |
||
150 |
DEBUGGING - Truncate transaction log |
|
151 |
||
152 |
.. _transaction_log_use_replicator: |
|
153 |
||
154 |
* ``transaction_log_use_replicator`` |
|
155 |
||
156 |
:Scope: Global
|
|
157 |
:Dynamic: No
|
|
158 |
:Option: :option:`--transaction-log.use-replicator` |
|
159 |
||
160 |
Name of the replicator plugin to use (default='default_replicator') |
|
1861.2.1
by David Shrewsbury
Add some initial Transaction Log plugin and Replication documentation. |
161 |
|
162 |
Transaction Log Messages
|
|
163 |
------------------------
|
|
164 |
||
165 |
Replication events are recorded using messages in the `Google Protocol Buffer |
|
166 |
<http://code.google.com/p/protobuf/>`_ (GPB) format. See the :doc:`Replication |
|
167 |
documentation </replication>` for more information. |
|
168 |
||
169 |
Transaction Log Format
|
|
170 |
----------------------
|
|
171 |
||
172 |
Currently, the transaction log file uses a simple, single-file, append-only |
|
173 |
format. The format of each entry in the transaction log file is::
|
|
174 |
||
175 |
4-bytes 4-bytes
|
|
176 |
+--------------+--------------+----------------------+
|
|
177 |
| Entry Type | Length | Serialized Message |
|
|
178 |
+--------------+--------------+----------------------+
|
|
179 |
||
180 |
The fields in the entry are: |
|
181 |
||
182 |
* **Entry Type** - Type of message this entry contains. Currently, |
|
183 |
this is always a Transaction GPB message. |
|
184 |
* **Length** - The length, in bytes, of the serialized message. |
|
185 |
* **Serialized Message** - The actual message data. |
|
2397.1.1
by Daniel Nichter
Skeleton documentation for all plugins, more complete docu for first half of plugins. |
186 |
|
187 |
.. _transaction_log_examples: |
|
188 |
||
189 |
Examples
|
|
190 |
--------
|
|
191 |
||
192 |
Sorry, there are no examples for this plugin. |
|
193 |
||
194 |
.. _transaction_log_authors: |
|
195 |
||
196 |
Authors
|
|
197 |
-------
|
|
198 |
||
199 |
Jay Pipes |
|
200 |
||
201 |
.. _transaction_log_version: |
|
202 |
||
203 |
Version
|
|
204 |
-------
|
|
205 |
||
206 |
This documentation applies to **transaction_log 0.1.1**.
|
|
207 |
||
208 |
To see which version of the plugin a Drizzle server is running, execute: |
|
209 |
||
210 |
.. code-block:: mysql |
|
211 |
||
212 |
SELECT MODULE_VERSION FROM DATA_DICTIONARY.MODULES WHERE MODULE_NAME='transaction_log' |
|
213 |
||
214 |
Changelog
|
|
215 |
---------
|
|
216 |
||
217 |
v0.1.1
|
|
218 |
^^^^^^
|
|
219 |
* First release.
|