Skip to content

[Bug] FE backup staging directories may not be cleaned up #65632

Description

@Ryan19929

Search before asking

  • I had searched in the issues and found no similar issues.

Version

master

What's Wrong?

FE writes backup metadata and job information to local staging directories under tmp_dir.

These directories are not cleaned up after they are no longer needed. For example, they may remain after a remote backup finishes or after a local snapshot expires or is evicted.

In addition, journal replay may create staging files on other FE nodes. Therefore, stale backup staging directories may accumulate independently on each FE and continuously consume disk space.

What You Expected?

FE should automatically remove backup staging directories when they are no longer needed:

  • Remove remote backup staging directories after the backup finishes or is cancelled.
  • Keep local snapshot directories while the snapshot is valid, and remove them after expiration or eviction.
  • Periodically remove orphan staging directories left by journal replay, FE restart, or interrupted cleanup.

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

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