Skip to content

Document the 'wal_cleanup_delay' option #3350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions doc/reference/configuration/cfg_binary_logging_snapshots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* :ref:`wal_mode <cfg_binary_logging_snapshots-wal_mode>`
* :ref:`wal_dir_rescan_delay <cfg_binary_logging_snapshots-wal_dir_rescan_delay>`
* :ref:`wal_queue_max_size <cfg_binary_logging_snapshots-wal_queue_max_size>`
* :ref:`wal_cleanup_delay <cfg_binary_logging_snapshots-wal_cleanup_delay>`

.. _cfg_binary_logging_snapshots-force_recovery:

Expand Down Expand Up @@ -111,3 +112,26 @@
| Default: 16777216 bytes
| Environment variable: TT_WAL_QUEUE_MAX_SIZE
| Dynamic: **yes**

.. _cfg_binary_logging_snapshots-wal_cleanup_delay:

.. confval:: wal_cleanup_delay

Since version :doc:`2.8.1 </release/2.8.1>`.
Copy link
Contributor

@sergepetrenko sergepetrenko Feb 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option already appeared in 2.6.3 (2.6.2-148-gd129729d9) and 2.7.2 (2.7.1-152-ge8c094644) (we had rolling releases back then, so 2.8.1 was released together with 2.7.2. and 2.6.3). This was considered a bugfix, so it was cherry-picked from 2.8.1 to the older versions.

The delay (in seconds) used to prevent the :ref:`Tarantool garbage collector <cfg_checkpoint_daemon-garbage-collector>`
from immediate removing :ref:`write-ahead log<internals-wal>` files after a node restart.
This delay helps :ref:`replicas <replication-roles>` sync with a master faster after its restart and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't say it helps to sync faster: it eliminates the risk that master deletes WALs needed for replicas after a restart. It fixes a possible erroneous situation rather than improves anything.

Although, yes, this means replicas do not risk downloading the data all over again, and thus can sync faster.

eliminates the need to download all the data again.

Once all the nodes in the replica set are up and running,
automatic cleanup is started again even if ``wal_cleanup_delay`` has not expired.

.. NOTE::

The ``wal_cleanup_delay`` option is not in effect if a node is running as an
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I get it right , this wording will be more precise:

Suggested change
The ``wal_cleanup_delay`` option is not in effect if a node is running as an
The ``wal_cleanup_delay`` option has no effect on nodes running as

I mean, it still has effect on other nodes in the replica set except anonymous replicas, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sounds better.

:ref:`anonymous replica<cfg_replication-replication_anon>`.

| Type: number
| Default: 14400 seconds
| Environment variable: TT_WAL_CLEANUP_DELAY
| Dynamic: **yes**