Skip to content

Conversation

@gerlowskija
Copy link
Contributor

Resolves #376

Prior to this commit, the 'NextScheduled' field of a solrbackup's status
was never updated, even if the user the backup schedule in the
solrbackup spec.

This commit changes this: NextScheduled is now recomputed during each
reconciliation, as long as there is not an active backup ongoing.

Prior to this commit, the 'NextScheduled' field of a solrbackup's status
was never updated, even if the user the backup schedule in the
solrbackup spec.

This commit changes this: NextScheduled is now recomputed during each
reconciliation, as long as there is not an active backup ongoing.
@HoustonPutman
Copy link
Contributor

We were discussing offline about how the schedule gets restarted if the user disables the recurrence and then re-enables it. Does this fix that?

Copy link
Contributor

@HoustonPutman HoustonPutman left a comment

Choose a reason for hiding this comment

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

Otherwise this looks simple and straightforward, LGTM!

@gerlowskija
Copy link
Contributor Author

how the schedule gets restarted if the user disables the recurrence and then re-enables it

This fixes that "problem", yep. Prior to this PR, a backup would immediately be run upon re-enabling the solrbackup. With this PR, we now wait if the time indicated by NextScheduled hasn't arrived yet. (Of course, if NextScheduled has already come and gone when a solrbackup is re-enabled, we will trigger a backup upon re-enabling.)

@gerlowskija gerlowskija merged commit 340495f into apache:main Jul 12, 2022
@gerlowskija gerlowskija deleted the 376_recompute_nextscheduled_backup_on_each_reconcile branch July 12, 2022 11:13
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.

Recompute solrbackup's .Status.NextScheduledTime on changes to .Spec.Recurrence.Schedule

2 participants