shivadarshan-devadiga commented on PR #19027: URL: https://github.com/apache/iceberg/pull/19027#issuecomment-7065265236
@manuzhang Thanks, you're right, `requiresRewrite` had the same issue. When a transaction rewrites a staged manifest with `clusterBy` and then retries, `requiresRewrite` matched the manifests rewritten in the first attempt by path, so the rewrite wasn't redone. The manifests written then were committed with the data sequence number (v2) and first row IDs (v3 and v4) of the first attempt. The new test `rewriteStagedManifestAfterTransactionRetry` shows it: without the change, FILE_A ends up with the concurrent commit's data sequence number, 1 instead of 2, for format versions 2, 3 and 4. `requiresRewrite` now also compares the inherited metadata (sequence number, min sequence number, first row ID) of each rewritten manifest with the current manifest at the same path, and performs a full rewrite if any of them changed. Unlike a directly deleted manifest, it can simply read the manifest again, so it rewrites rather than fails. Both checks share `inheritsSameMetadata` and a by-path map of the current manifests. Please take another look when you get a chance. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
