Skip to content

Commit d191226

Browse files
committed
Apply review suggestions
1 parent 2255fd0 commit d191226

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

doc/code_snippets/snippets/config/instances.enabled/persistence_snapshot/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ groups:
88
dir: 'var/lib/{{ instance_name }}/snapshots'
99
count: 10
1010
by:
11-
interval: 60
11+
interval: 7200
1212
iproto:
1313
listen:
1414
- uri: '127.0.0.1:3301'

doc/concepts/configuration/configuration_persistence.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Configure the automatic snapshot creation
3030
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3131

3232
In Tarantool, it is possible to set automatic :ref:`snapshot creation </reference/reference_lua/box_snapshot>`.
33-
To enable it, the :ref:`snapshot.by.interval <configuration_reference_snapshot_by_interval>` option is used.
33+
The feature is enabled by default with the :ref:`snapshot.by.interval <configuration_reference_snapshot_by_interval>` option.
3434
The option sets up the :ref:`checkpoint daemon <configuration_persistence_checkpoint_daemon>` that takes new snapshots
3535
every ``snapshot.by.interval`` seconds.
3636
When the number of snapshots reaches the limit of :ref:`snapshot.count <configuration_reference_snapshot_count>` size,
@@ -46,7 +46,7 @@ The configuration of the checkpoint daemon might look as follows:
4646
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/persistence_snapshot/config.yaml
4747
:language: yaml
4848
:start-at: count:
49-
:end-at: 60
49+
:end-at: 7200
5050
:dedent:
5151

5252
If the ``snapshot.by.interval`` option is set to zero, the checkpoint daemon is disabled.

doc/reference/configuration/configuration_reference.rst

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,9 +2414,12 @@ To learn more about the snapshots' configuration, check the :ref:`Persistence <c
24142414

24152415
.. confval:: snapshot.dir
24162416

2417-
A directory where memtx stores snapshot (.snap) files. Can be relative to
2418-
``process.work_dir``. If not specified, defaults to
2419-
``process.work_dir``. See also: :ref:`wal.dir <configuration_reference_wal_dir>`.
2417+
A directory where memtx stores snapshot (.snap) files.
2418+
A relative path in this option is interpreted as relative to ``process.work_dir``.
2419+
2420+
By default, snapshots and WAL files are stored in the same directory.
2421+
You can set different values for the ``snapshot.dir`` and :ref:`wal.dir <configuration_reference_wal_dir>` options
2422+
to store them on different physical disks for performance matters.
24202423

24212424
|
24222425
| Type: string
@@ -2458,10 +2461,10 @@ To learn more about the snapshots' configuration, check the :ref:`Persistence <c
24582461
24592462
snapshot:
24602463
by:
2461-
interval: 60
2464+
interval: 7200
24622465
count: 10
24632466
2464-
In the example, the checkpoint daemon creates a new snapshot each hour until
2467+
In the example, the checkpoint daemon creates a new snapshot every two hours until
24652468
it has created ten snapshots. After that, it deletes the oldest snapshot
24662469
(and any associated write-ahead-log files) after creating a new one.
24672470

@@ -2496,10 +2499,10 @@ snapshot.by.*
24962499
.. literalinclude:: /code_snippets/snippets/config/instances.enabled/persistence_snapshot/config.yaml
24972500
:language: yaml
24982501
:start-at: by:
2499-
:end-at: interval: 60
2502+
:end-at: interval: 7200
25002503
:dedent:
25012504

2502-
In the example, the checkpoint daemon creates a new database snapshot once per minute, if there is activity.
2505+
In the example, the checkpoint daemon creates a new database snapshot every two hours, if there is activity.
25032506

25042507
|
25052508
| Type: number
@@ -2571,11 +2574,12 @@ To learn more about the WAL configuration, check the :ref:`Persistence <configur
25712574

25722575
.. confval:: wal.dir
25732576

2574-
A directory where write-ahead log (.xlog) files are stored. Can be relative
2575-
to ``process.work_dir``. Sometimes ``wal.dir`` and
2576-
:ref:`snapshot.dir <configuration_reference_snapshot_dir>` are specified with different values, so
2577-
that write-ahead log files and snapshot files can be stored on different
2578-
disks. If not specified, defaults to ``process.work_dir``.
2577+
A directory where write-ahead log (.xlog) files are stored.
2578+
A relative path in this option is interpreted as relative to ``process.work_dir``.
2579+
2580+
By default, WAL files and snapshots are stored in the same directory.
2581+
You can set different values for the ``wal.dir`` and :ref:`snapshot.dir <configuration_reference_snapshot_dir>` options
2582+
to store them on different physical disks for performance matters.
25792583

25802584
|
25812585
| Type: string

0 commit comments

Comments
 (0)