Skip to content
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

box.snapshot() should randomize next snapshot interval #4432

Closed
kostja opened this issue Aug 16, 2019 · 0 comments
Closed

box.snapshot() should randomize next snapshot interval #4432

kostja opened this issue Aug 16, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@kostja
Copy link
Contributor

kostja commented Aug 16, 2019

In tarantool, snapshot interval is set randomly within checkpoint_interval period. However, if you do box.snapshot(), the next snapshot is scheduled exactly checkpoint_interval from the current time.
Many deployment systems snapshot entire cluster right after deployment, to take a backup. This kills randomness, since all instances begin to count next interval from the current time.

Fix: randomize the next checkpoint time after a snapshot.

@kostja kostja added the bug Something isn't working label Aug 16, 2019
@kostja kostja closed this as completed in 6277f48 Aug 16, 2019
kostja added a commit that referenced this issue Aug 16, 2019
…t().

Before this patch, snapshot interval was set randomly within
checkpoint_interval period. However, after box.snapshot(), the next
snapshot was scheduled exactly checkpoint_interval from the current time.
Many orchestration scripts snapshot entire cluster right after deployment,
to take a backup. This kills randomness, since all instances begin to
count the next checkpoint time from the current time.

Randomize the next checkpoint time after a manual snapshot as well.

Fixes gh-4432

(cherry picked from commit 6277f48)
kostja added a commit that referenced this issue Aug 16, 2019
…t().

Before this patch, snapshot interval was set randomly within
checkpoint_interval period. However, after box.snapshot(), the next
snapshot was scheduled exactly checkpoint_interval from the current time.
Many orchestration scripts snapshot entire cluster right after deployment,
to take a backup. This kills randomness, since all instances begin to
count the next checkpoint time from the current time.

Randomize the next checkpoint time after a manual snapshot as well.

Fixes gh-4432

(cherry picked from commit 6277f48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant