szehon-ho opened a new issue #2435: URL: https://github.com/apache/iceberg/issues/2435
A while ago @aokolnychyi had suggested a new action "RepairManifestsAction", and I wanted to discuss prior to starting to look at it. The initial idea is that it allows Iceberg table metadata to be cleanly repaired after a metadata bug, such as #1980 (file size incorrect in manifest file) So one proposal is to have a RepairManifestsAction with the typical apis like: `actions.repairManifests().filter(Expression expr).caseSensitive(boolean value)`. //filter out data files that this action will read And have following options that make different levels of spark jobs: `withRepairFileSize(boolean value)`. //Reads file sizes from FileSystem, rewrites manifests `withRepairRowCount(boolean value)` //Opens the file and counts rows, rewrites manifests with the row count `withRepairMetrics(boolean value)` //Opens the file, and from the file metadata rewrites the manifest with latest metrics `withRemoveDeletedFiles(boolean value)` //if any datafile referenced by manifest is removed, remove it from manifest I was thinking that the last one may also be helpful, if a datafile becomes accidentally removed or corrupted in Iceberg table , an exception "java.io.FileNotFoundException: No such file or directory" is hit on a query to that table. Maybe later having 'repair manifest-list or repair metadata' is also useful to handle cases if manifest files themselves are removed.. This is a bit different than 'RewriteManifests' as that just rewrites manifests but does not fix them by reading data-files. The only way to solve an issue like #1980 today would probably be just rewriting all data files, which is a bit expensive. -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
