SnapCenter does not delete SCSQL database backup due to UnobservedTaskException
Applies to
- SnapCenter Server
- SnapCenter Plug-in for Microsoft SQL Database (SCSQL)
Issue
- When applying a retention policy during an SCSQL backup job, unnecessary backups are not deleted
- The job details page in SnapCenter GUI indicates that Registering Backup and Applying Retention task was completed without any error
SnapManagerWeb.log
shows error:
ERROR SnapManagerWeb PID=[XXXX] TID=[X] UnobservedTaskException occurred
ERROR SnapManagerWeb PID=[XXXX] TID=[X] Sequence contains no elements Source: System.Core
Stack Trace: at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at SnapManager.SMSCore.Policy.SmRetentionHandler.FilterBackupsforCurrentHost(List`1 backups, List`1 latestBackupComponentObjectIds)
at SnapManager.SMSCore.Policy.SmRetentionHandler.ProcessRetention(SmRetentionSettings settings, List`1 backups, SmBackup backup,
List`1 latestBackupComponentObjectIds, String pgName, Int64 jobId)
at SnapManager.SMSCore.Policy.SmRetentionHandler.Execute()
at SnapManager.SMSCore.Backup.SmRetentionManager.StartRetention(SmBackup currentBackup, SmUserOperationContext userContext,
SmJob backupJob, SmPluginCode pluginCode, String pluginName)
at SnapManager.SMSCore.Backup.SmRetentionManager.StartQueuedRetention(Int64 backupId, SmPluginCode pluginCode)
at SnapManager.SMSCore.Backup.SmRetentionManager.ProcessQueuedRetentions()
at System.Threading.Tasks.Task.Execute()