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

controller: Ensure completed streams are recorded before stopping #57

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rikonen
Copy link
Contributor

@rikonen rikonen commented Jun 23, 2021

This should prevent the following from happening:

  1. First scheduled backup is started
  2. Backup time is changed
  3. Basebackup from step 1 finishes
  4. Daemon main loop stops controller
  5. Config is reloaded
  6. Daemon main loop starts controller
  7. Controller does not load backups from object storage because last load
    happened fairly recently so backup from step 1 is not visible
  8. New normalized backup time differs from previous one, as there are no
    backups new backup is created immediately
  9. Basebackup from step 8 finishes
  10. Completed streams are processed and list of backups is refreshed

With this change step 10 happens at step 4 and no new backup is started
in step 8 because there is already a known backup that is very recent.

About this change: What it does, why it matters

(all contributors please complete this section, including maintainers)

This should prevent the following from happening:

1. First scheduled backup is started
2. Backup time is changed
3. Basebackup from step 1 finishes
4. Daemon main loop stops controller
5. Config is reloaded
6. Daemon main loop starts controller
7. Controller does not load backups from object storage because last load
   happened fairly recently so backup from step 1 is not visible
8. New normalized backup time differs from previous one, as there are no
   backups new backup is created immediately
9. Basebackup from step 8 finishes
10. Completed streams are processed and list of backups is refreshed

With this change step 10 happens at step 4 and no new backup is started
in step 8 because there is already a known backup that is very recent.
@rikonen
Copy link
Contributor Author

rikonen commented Jun 23, 2021

Created as draft since this is speculative fix based on couple of log lines, didn't actually test in any way

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.

1 participant