rdsn
rdsn copied to clipboard
BREAKING CHANGE: fix behavior when backup period less than 1day
Before this patch, we cannot start periodic backup correctly when backup_interval_secends
less than one_day_seconds
, because there is some issues in should_start_backup_unlocked()
.
Now we start the first backup only when cur_time == start_time
, then periodically start backup at intervals defined by backup_interval_secends
.
The start time of subsequent backups is only related to last_backup_start_time
and backup_interval_secends
, so the start_time
of a policy shouldn't be modified if a backup has already started.
@acelyc111 The new implementation is actually making the kernel design simpler than before, considering the deleted code that handles clock drift. We don't have to avoid the two backups being too close, or similiar edge cases.
From the users perspective, this design is primitive and prone to misuse. I prefer this problem to be solved in Backup Manager. You can set up rules or limitations in Backup Manager.