mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
docs(backups): name what the MariaDB cleanup reads uncached
The reader's comment named only RestoreJobs, and the restore path said the cleanup holds a Backup only for RestoreJobs it can see, while the cleanup now lists both RestoreJobs and operator Restores straight from the API server. Assisted-by: LLM Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
This commit is contained in:
1 parent
0195a66fae
commit
f2507b4b84
2 files changed
+5
-3
No files matched your search
@@ -44,8 +44,9 @@ type BackupReconciler struct {
|
||||
// cleanup reads them to reach the platform bucket.
|
||||
CredentialsConfig BackupCredentialsConfig
|
||||
// APIReader is the manager's uncached reader. The MariaDB cleanup lists
|
||||
// the RestoreJobs of a Backup through it: a restore that started before
|
||||
// the delete may not be in the cache yet. Wired in SetupWithManager.
|
||||
// the RestoreJobs and operator Restores of a Backup through it: a
|
||||
// restore that started before the delete may not be in the cache yet.
|
||||
// Wired in SetupWithManager.
|
||||
APIReader client.Reader
|
||||
|
||||
// newS3ObjectLister and newS3ObjectRemover override the S3 client the
|
||||
|
||||
@@ -674,7 +674,8 @@ func (r *RestoreJobReconciler) mariadbRestoreTargetTime(ctx context.Context, rj
|
||||
// Deleting a Backup deletes its dump, and the operator restores the
|
||||
// nearest other dump once its own is gone, so a restore must not start
|
||||
// from a Backup being deleted. The copy in hand can predate the delete;
|
||||
// the cleanup holds the Backup only for RestoreJobs it can already see.
|
||||
// the cleanup holds the Backup only for restores that exist when it
|
||||
// lists them.
|
||||
live := &backupsv1alpha1.Backup{}
|
||||
if err := r.apiReader().Get(ctx, client.ObjectKeyFromObject(backup), live); err != nil {
|
||||
if apierrors.IsNotFound(err) {
|
||||
|
||||
Reference in new issue
Block a user