Skip to content

Commit 331e2b4

Browse files
committed
Add box.cfg settings: new WAL settings
1 parent e73218e commit 331e2b4

File tree

1 file changed

+75
-2
lines changed

1 file changed

+75
-2
lines changed

doc/reference/configuration/cfg_binary_logging_snapshots.rst

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
* :ref:`wal_dir_rescan_delay <cfg_binary_logging_snapshots-wal_dir_rescan_delay>`
66
* :ref:`wal_queue_max_size <cfg_binary_logging_snapshots-wal_queue_max_size>`
77
* :ref:`wal_cleanup_delay <cfg_binary_logging_snapshots-wal_cleanup_delay>`
8+
* :ref:`wal_ext <cfg_binary_logging_snapshots-wal_ext>`
9+
* :ref:`secure_erasing <cfg_binary_logging_secure_erasing>`
810

911
.. _cfg_binary_logging_snapshots-force_recovery:
1012

1113
.. confval:: force_recovery
1214

1315
Since version 1.7.4.
16+
1417
If ``force_recovery`` equals true, Tarantool tries to continue if there is
1518
an error while reading a :ref:`snapshot file<index-box_persistence>`
1619
(at server instance start) or a :ref:`write-ahead log file<internals-wal>`
@@ -31,6 +34,7 @@
3134
.. confval:: wal_max_size
3235

3336
Since version 1.7.4.
37+
3438
The maximum number of bytes in a single write-ahead log file.
3539
When a request would cause an .xlog file to become larger than
3640
``wal_max_size``, Tarantool creates another WAL file.
@@ -45,6 +49,7 @@
4549
.. confval:: snap_io_rate_limit
4650

4751
Since version 1.4.9.
52+
4853
Reduce the throttling effect of :doc:`box.snapshot() </reference/reference_lua/box_snapshot>` on
4954
INSERT/UPDATE/DELETE performance by setting a limit on how many
5055
megabytes per second it can write to disk. The same can be
@@ -64,7 +69,9 @@
6469

6570
.. confval:: wal_mode
6671

67-
Since version 1.6.2. Specify fiber-WAL-disk synchronization mode as:
72+
Since version 1.6.2.
73+
74+
Specify fiber-WAL-disk synchronization mode as:
6875

6976
* ``none``: write-ahead log is not maintained.
7077
A node with ``wal_mode = none`` can't be replication master;
@@ -83,6 +90,7 @@
8390
.. confval:: wal_dir_rescan_delay
8491

8592
Since version 1.6.2.
93+
8694
Number of seconds between periodic scans of the write-ahead-log
8795
file directory, when checking for changes to write-ahead-log
8896
files for the sake of :ref:`replication <replication>` or :ref:`hot standby <index-hot_standby>`.
@@ -97,6 +105,7 @@
97105
.. confval:: wal_queue_max_size
98106

99107
Since version :doc:`2.8.1 </release/2.8.1>`.
108+
100109
The size of the queue (in bytes) used by a :ref:`replica <replication-roles>` to submit
101110
new transactions to a :ref:`write-ahead log<internals-wal>` (WAL).
102111
This option helps limit the rate at which a replica submits transactions to the WAL.
@@ -118,6 +127,7 @@
118127
.. confval:: wal_cleanup_delay
119128

120129
Since version :doc:`2.6.3 </release/2.6.3>`.
130+
121131
The delay (in seconds) used to prevent the :ref:`Tarantool garbage collector <cfg_checkpoint_daemon-garbage-collector>`
122132
from immediately removing :ref:`write-ahead log<internals-wal>` files after a node restart.
123133
This delay eliminates possible erroneous situations when the master deletes WALs
@@ -136,4 +146,67 @@
136146
| Type: number
137147
| Default: 14400 seconds
138148
| Environment variable: TT_WAL_CLEANUP_DELAY
139-
| Dynamic: **yes**
149+
| Dynamic: **yes**
150+
151+
152+
.. _cfg_binary_logging_snapshots-wal_ext:
153+
154+
.. confval:: wal_ext
155+
156+
Since version :doc:`2.11.0 </release/2.11.0>`.
157+
158+
(Enterprise Edition only) Allows you to add auxiliary information to each :ref:`write-ahead log <internals-wal>` record.
159+
For example, you can enable storing an old and new tuple for each CRUD operation performed.
160+
This information might be helpful for implementing a CDC (Change Data Capture) utility that transforms a data replication stream.
161+
162+
You can enable storing old and new tuples as follows:
163+
164+
* Set the ``old`` and ``new`` options to ``true`` to store old and new tuples in a write-ahead log for all spaces.
165+
166+
.. code-block:: lua
167+
168+
box.cfg {
169+
wal_ext = { old = true, new = true }
170+
}
171+
172+
* To adjust these options for specific spaces, use the ``spaces`` option.
173+
174+
.. code-block:: lua
175+
176+
box.cfg {
177+
wal_ext = {
178+
old = true, new = true,
179+
spaces = {
180+
space1 = { old = false },
181+
space2 = { new = false }
182+
}
183+
}
184+
}
185+
186+
187+
The configuration for specific spaces has priority over the global configuration,
188+
so only new tuples are added to the log for ``space1`` and only old tuples for ``space2``.
189+
190+
Note that records with additional fields are :ref:`replicated <replication-architecture>` as follows:
191+
192+
* If a replica doesn't support the extended format configured on a master, auxiliary fields are skipped.
193+
* If a replica and master have different configurations for WAL records, a master's configuration is ignored.
194+
195+
| Type: map
196+
| Default: nil
197+
| Environment variable: TT_WAL_EXT
198+
199+
200+
.. _cfg_binary_logging_secure_erasing:
201+
202+
.. confval:: secure_erasing
203+
204+
Since version :doc:`3.0.0 </release/3.0.0>`.
205+
206+
(Enterprise Edition only) If **true**, forces Tarantool to overwrite a data file a few times before deletion to render recovery of a deleted file impossible.
207+
The option applies to both ``.xlog`` and ``.snap`` files as well as Vinyl data files.
208+
209+
| Type: boolean
210+
| Default: false
211+
| Environment variable: TT_SECURE_ERASING
212+
| Dynamic: **yes**

0 commit comments

Comments
 (0)