myhoard
myhoard copied to clipboard
controller: Ensure completed streams are recorded before stopping
This should prevent the following from happening:
- First scheduled backup is started
- Backup time is changed
- Basebackup from step 1 finishes
- Daemon main loop stops controller
- Config is reloaded
- Daemon main loop starts controller
- Controller does not load backups from object storage because last load happened fairly recently so backup from step 1 is not visible
- New normalized backup time differs from previous one, as there are no backups new backup is created immediately
- Basebackup from step 8 finishes
- 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)
Created as draft since this is speculative fix based on couple of log lines, didn't actually test in any way