haizhou-zhao opened a new issue, #10535:
URL: https://github.com/apache/iceberg/issues/10535

   ### 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:
   
https://github.com/apache/iceberg/blob/c7de6cb345995cb47312edbef6edae2f17fb8aba/core/src/main/java/org/apache/iceberg/BaseRewriteManifests.java#L182
   
   ## 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to