myhoard icon indicating copy to clipboard operation
myhoard copied to clipboard

controller: Ensure completed streams are recorded before stopping

Open rikonen opened this issue 3 years ago • 1 comments

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)

rikonen avatar Jun 23 '21 20:06 rikonen

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

rikonen avatar Jun 23 '21 20:06 rikonen