Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix existing MantleBackup's reconciler for data replication #41

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

ushitora-anqou
Copy link
Contributor

No description provided.

@ushitora-anqou ushitora-anqou changed the title fix MantleBackup's reconciler for data replication fix existing MantleBackup's reconciler for data replication Sep 20, 2024
@ushitora-anqou ushitora-anqou marked this pull request as ready for review September 20, 2024 06:35
if backup1.Status.SnapID == nil ||
*backup1.Status.SnapID < *backup.Status.SnapID &&
backup1.ObjectMeta.DeletionTimestamp.IsZero() &&
!meta.IsStatusConditionTrue(backup1.Status.Conditions, mantlev1.BackupConditionSyncedToRemote) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The condition is OK. However, this situation is not an error like the failure of access to API servers but waiting for fullfilling some conditions. So, it's better to return from Reconcile() with ctrl.Result{Requeue: true}, nil. Probably the return value of replicate() should also be changed to distinguish whether the request will be requeued due to error or not.

I should be noticed this point in the previous PR which is to implementing replicate(). My fault.

…tion

Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
@ushitora-anqou
Copy link
Contributor Author

@satoru-takeuchi @toshipp I fixed my code according to your reviews. Could you review this PR again? The changes are as follows: https://github.com/cybozu-go/mantle/compare/6d291c37d39095bca8d6a54db12329b5bd67aa63..a5039dd0cda8ae26cea5ce2343926c5881b49b0c

Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
Copy link
Contributor

@toshipp toshipp left a comment

Choose a reason for hiding this comment

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

lgtm

@satoru-takeuchi satoru-takeuchi merged commit 43ca34a into main Sep 24, 2024
3 checks passed
@satoru-takeuchi satoru-takeuchi deleted the mantlebackup/fix-existing-impl branch September 24, 2024 22:25
@ushitora-anqou
Copy link
Contributor Author

Thank you!

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.

3 participants