Skip to content

[DeleteManifest] Making file validation optional #10535

@haizhou-zhao

Description

@haizhou-zhao

Feature Request / Improvement

Background

This issue comes up when we are trying to fix a corrupted table where one manifest file (with active reference to data files) was (unintentionally) removed from the file system. At that point, our only way out was to remove the reference to that manifest file so that queries on the table does not fail with NotFoundException. This are the APIs we executed to achieve that:

table.rewriteManifests().deleteManifest(manifest).commit()

However, we found that Manifest rewrite implementation will force consistency on file counts, which means the above line of code will fail due to the following validation:

Feature Request

Although keeping file counts consistent with manifest rewrite serves most cases, in corner cases like fixing a corrupted table with manifest file deleted, user does intentionally want to lose all the data files referred by that missing manifest file (so that query against the table could start to work, and they can backfill the lost data later). We'd like to raise a feature request to make validateFilesCounts check optional on manifest rewrite, so that users have the choice to disable it by some configuration.

Query engine

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementPR that improves existing functionalitystale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions