Skip to content

[BUG] Manifest list files are not deleted #967

Closed
@sfc-gh-rxing

Description

@sfc-gh-rxing

Describe the bug

I noticed that the current implementation of dropTableWithPurge doesn’t delete snapshots. I took a look into the TaskExecution, TableCleanupTaskHandler, ManifestFileCleanupTaskHandler, and it appears that only the metadata JSON files, manifest files, and data files are removed.

To Reproduce

  1. Launch Polaris locally
  2. Create a Polaris catalog: polaris_catalog
  3. Configure Spark to connect to the local Polaris instance
  4. Create a namespace: create namespace ns;
  5. Create an Iceberg table: create table ns.t1 (id INT, name STRING);
  6. Insert some data into it: insert into ns.t1 values(1, 'XJKDC')
  7. Do drop table with purge: drop table ns.t1 purge;
  8. Check the s3 bucket to see if there are some manifest lists file remaining.

Actual Behavior

The snapshots files (manifest list files) are not deleted.

Expected Behavior

The table location should not have any files in it after we drop the table with purge.

Additional context

Introduced in this PR: #312

System information

MacOS
Lastest Polaris

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions