Skip to content

Conversation

@HoustonPutman
Copy link
Contributor

#455 introduced a bug for non-recurring backups that was unearthed while working on #507

Basically we need to only update the NextScheduledTimestamp if recurrence is enabled.

I also restructured the logic to hopefully make it more clear when backup logic should be run.

@HoustonPutman HoustonPutman added bug Something isn't working backup labels Dec 21, 2022
@HoustonPutman HoustonPutman added this to the main (v0.7.0) milestone Dec 21, 2022
Copy link
Contributor

@gerlowskija gerlowskija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - maybe next time we could put some of the more cosmetic improvements in their own commit, but it seems pretty harmless here.

Thanks for catching my bug!


// Schedule the next backupTime, if it doesn't have a next scheduled time, it has recurrence and the current backup is finished
if backup.Status.IndividualSolrBackupStatus.Finished {
if backup.Status.IndividualSolrBackupStatus.Finished && backup.Spec.Recurrence.IsEnabled() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[+1] Weird that the comment on L147 mentions recurrence-being-enabled as being a prereq, but we never checked for it before now. Must've just been an oversight on my part?

Anyway, good catch!

@HoustonPutman
Copy link
Contributor Author

maybe next time we could put some of the more cosmetic improvements in their own commit, but it seems pretty harmless here.

Good call, just included since I was going mad trying to fix it so many ways before realizing that I wasn't testing the changes at all....

@HoustonPutman HoustonPutman merged commit c3cda10 into apache:main Dec 23, 2022
@HoustonPutman HoustonPutman deleted the backup-fix branch December 23, 2022 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backup bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants