[lake/iceberg] Fix Iceberg table rebinding with different Fluss properties - #4220
[lake/iceberg] Fix Iceberg table rebinding with different Fluss properties#4220litiliu wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Updates Iceberg table compatibility checks to treat Fluss-owned fluss.* metadata as non-blocking during idempotent table creation, while keeping strict validation for Iceberg-native properties.
Changes:
- Skip
fluss.*keys when comparing expected vs existing Iceberg table properties for compatibility. - Add a unit test case asserting that differing
fluss.table.replication.factordoes not mark a table incompatible.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/IcebergLakeCatalog.java | Ignores fluss.* keys during property compatibility checks. |
| fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/IcebergLakeCatalogTest.java | Adds regression coverage for differing Fluss-owned property values. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (entry.getKey().startsWith(FLUSS_CONF_PREFIX)) { | ||
| continue; | ||
| } | ||
| String actual = existingProperties.get(entry.getKey()); |
| // Fluss properties are metadata owned by Fluss and may differ between descriptors. | ||
| expected.put("fluss.table.replication.factor", "1"); | ||
| existing.put("fluss.table.replication.factor", "2"); | ||
| assertThat(flussIcebergCatalog.isIcebergPropertiesCompatible(existing, expected)).isTrue(); | ||
|
|
||
| // Existing missing an expected key -> incompatible. | ||
| existing = new HashMap<>(); | ||
| existing.put("k1", "v1"); |
|
Thanks @luoyuxia for reviewing and approving this PR! |
Purpose
Linked issue: close #4218
Prevent Fluss-owned
fluss.*metadata from making an existing Iceberg table appear incompatible during idempotent table creation. Iceberg-native properties remain strictly validated.Brief change log
fluss.prefix during existing Iceberg table compatibility checks.fluss.table.replication.factor.Tests
./mvnw -q -pl fluss-lake/fluss-lake-iceberg -am -DskipITs -Dtest=IcebergLakeCatalogTest -Dsurefire.failIfNoSpecifiedTests=false testAPI and Format
No API or storage format changes.
Documentation
No documentation changes.
Generative AI disclosure