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

Conversation

andreyaksenov
Copy link
Contributor

Add the wal_cleanup_delay option to the reference.

Resolves #2022

Copy link
Contributor

@sergepetrenko sergepetrenko left a comment

Choose a reason for hiding this comment

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

Hi! Thanks for the patch!

Please see my comments below.


.. 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.

Since version :doc:`2.8.1 </release/2.8.1>`.
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.

Copy link
Contributor

@sergepetrenko sergepetrenko left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes! LGTM.

@andreyaksenov andreyaksenov requested a review from p7nov February 27, 2023 09:54
Copy link
Contributor

@p7nov p7nov left a comment

Choose a reason for hiding this comment

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

Nice. Just one question

from immediately removing :ref:`write-ahead log<internals-wal>` files after a node restart.
This delay eliminates possible erroneous situations when the master deletes WALs
needed by :ref:`replicas <replication-roles>` after restart.
As a consequence, replicas 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.

the master?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, thanks


.. 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.

@andreyaksenov andreyaksenov merged commit 70bca65 into latest Feb 27, 2023
@andreyaksenov andreyaksenov deleted the wal_cleanup_delay branch February 27, 2023 11:08
p7nov pushed a commit that referenced this pull request Mar 24, 2023
Document the 'wal_cleanup_delay' option.

Resolves #2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3pt] Add wal_cleanup_delay configuration parameter
3 participants