Skip to content

[Console] Batch delete expired application backups in cleanup task #4390

Description

@shangeyao

Problem

ApplicationBackUpCleanTask performs N+1 queries: one grouped query per app id, then loads all backups per app and deletes them one-by-one with removeById.

Proposed solution

  • Load all backups in a single query
  • Group and trim in memory per application id
  • Delete expired records with one removeByIds batch call

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions