Commit e8176fa
[AMORO-4163][ams] Fix CommitFailedException when loading legacy mixed-iceberg tables on Iceberg 1.7.2
Iceberg 1.7.2 introduced a breaking change in HadoopTableOperations.commit():
it now uses reference equality (==) to compare the `base` parameter against the
internally cached currentMetadata. If the references differ (e.g. because
versionAndMetadata() refreshes the internal state), a CommitFailedException with
no cause is thrown, which propagates through Thrift and causes table creation to
fail with "update table meta failed".
The commit in newTableOperations() is a best-effort migration step that backfills
REST-based mixed-format properties into legacy table metadata (tables created
before v0.7.0). It is not required for the table to function correctly; a failure
here should not abort table loading. Wrap the call in try-catch and log a warning
so the migration is retried on the next load instead of surfacing as a fatal error.
This fixes the flaky TestInternalMixedCatalogService.CompatibilityCatalogTests
#testNewCatalogLoadHistorical test observed after the Iceberg 1.7.2 upgrade.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 10d13d4 commit e8176fa
1 file changed
Lines changed: 15 additions & 2 deletions
File tree
- amoro-ams/src/main/java/org/apache/amoro/server/table/internal
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
78 | | - | |
79 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
| |||
0 commit comments