What did you do?
We have multiple TiDB database clusters used for development, testing, and production. We plan to upgrade our TiDB version from 6.1 to 7.5.1, and we have just completed the TiDB upgrade in our testing environment. However, after the upgrade, we encountered an issue with the BackupSchedule behaving abnormally: it immediately deletes the backup files after the backup job is completed (this was not an issue before the upgrade),as follows are the log summaries:
I0402 14:21:29.624256 1 event.go:282] Event(v1.ObjectReference{Kind:"Backup", Namespace:"tidb-cluster", Name:"basicai-backup-schedule-minio2-2024-04-02t14-21-00", UID:"6d2d889e-9d79-443b-8547-dcbb9228173a", APIVersion:"pingcap.com/v1alpha1", ResourceVersion:"635369522", FieldPath:""}): type: 'Normal' reason: 'SuccessfulCreate' create Backup tidb-cluster/basicai-backup-schedule-minio2-2024-04-02t14-21-00 for backupSchedule/basicai-backup-schedule-minio2 successful
I0402 14:21:29.633334 1 backup_schedule_status_updater.go:61] BackupSchedule: [tidb-cluster/basicai-backup-schedule-minio2] updated successfully
I0402 14:21:29.633337 1 event.go:282] Event(v1.ObjectReference{Kind:"Backup", Namespace:"tidb-cluster", Name:"basicai-backup-schedule-minio2-2024-04-02t14-21-00", UID:"6d2d889e-9d79-443b-8547-dcbb9228173a", APIVersion:"pingcap.com/v1alpha1", ResourceVersion:"635369522", FieldPath:""}): type: 'Normal' reason: 'SuccessfulCreate' create job tidb-cluster/backup-basicai-backup-schedule-minio2-2024-04-02t14-21-00 for cluster basicai-backup-schedule-minio2 backup successful
I0402 14:21:29.633504 1 backup_schedule_controller.go:105] BackupSchedule: tidb-cluster/basicai-backup-schedule-minio2, still need sync: backup schedule tidb-cluster/basicai-backup-schedule-minio2, the last backup basicai-backup-schedule-minio2-2024-04-02t14-21-00 is still running, requeuing
I0402 14:21:29.642125 1 backup_status_updater.go:128] Backup: [tidb-cluster/basicai-backup-schedule-minio2-2024-04-02t14-21-00] updated successfully
I0402 14:21:30.634724 1 backup_schedule_controller.go:105] BackupSchedule: tidb-cluster/basicai-backup-schedule-minio2, still need sync: backup schedule tidb-cluster/basicai-backup-schedule-minio2, the last backup basicai-backup-schedule-minio2-2024-04-02t14-21-00 is still running, requeuing
I0402 14:21:32.635727 1 backup_schedule_controller.go:105] BackupSchedule: tidb-cluster/basicai-backup-schedule-minio2, still need sync: backup schedule tidb-cluster/basicai-backup-schedule-minio2, the last backup basicai-backup-schedule-minio2-2024-04-02t14-21-00 is still running, requeuing
I0402 14:21:36.652154 1 backup_schedule_manager.go:388] backup schedule tidb-cluster/basicai-backup-schedule-minio2 gc backup basicai-backup-schedule-minio2-2024-04-02t14-21-00 success
I0402 14:21:36.652218 1 event.go:282] Event(v1.ObjectReference{Kind:"Backup", Namespace:"tidb-cluster", Name:"basicai-backup-schedule-minio2-2024-04-02t14-21-00", UID:"6d2d889e-9d79-443b-8547-dcbb9228173a", APIVersion:"pingcap.com/v1alpha1", ResourceVersion:"635369570", FieldPath:""}): type: 'Normal' reason: 'SuccessfulDelete' delete Backup tidb-cluster/basicai-backup-schedule-minio2-2024-04-02t14-21-00 for backupSchedule/basicai-backup-schedule-minio2 successful
I0402 14:21:36.662773 1 backup_schedule_status_updater.go:61] BackupSchedule: [tidb-cluster/basicai-backup-schedule-minio2] updated successfully
The defination of our BackupSchedule is as follow:
What did you expect to see?
Backup files will NOT be deleted by BackupSchedule immediately after the backup job is completed.
What did you see instead?
The BackupSchedule behaving abnormally: it immediately deletes the backup files after the backup job is completed (this was not an issue before the upgrade).
Bug Report
What version of Kubernetes are you using? 1.24.6
What version of TiDB Operator are you using? 1.5.2
What's the status of the TiDB cluster pods?
What did you do? We have multiple TiDB database clusters used for development, testing, and production. We plan to upgrade our TiDB version from 6.1 to 7.5.1, and we have just completed the TiDB upgrade in our testing environment. However, after the upgrade, we encountered an issue with the BackupSchedule behaving abnormally: it immediately deletes the backup files after the backup job is completed (this was not an issue before the upgrade),as follows are the log summaries:
The defination of our BackupSchedule is as follow:
What did you expect to see? Backup files will NOT be deleted by BackupSchedule immediately after the backup job is completed.
What did you see instead? The BackupSchedule behaving abnormally: it immediately deletes the backup files after the backup job is completed (this was not an issue before the upgrade).