Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[lake/iceberg] Reserved write-mode properties can be set and reset through their `iceberg.` key

Open Beginner friendly
#4,658 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@aphenix-r7 is already working on this.

Since Oct 15, 2026.

  • #4659 by @aphenix-r7 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
data

Research direction

Start in applyPropertyChanges in fluss-lake/fluss-lake-iceberg-common/.../IcebergLakeCatalog.java, where the RESERVED_PROPERTIES check runs on the Fluss key before convertFlussPropertyKeyToIceberg strips the iceberg. prefix; the ResetOption branch needs the same check. Extend IcebergLakeCatalogTest.alterReservedTableProperties to also pass each reserved name with the iceberg. prefix. Done when prefixed set and reset calls fail with the existing messages, the bare-key cases still fail, and the Iceberg table is left unchanged.

Written by the indexing model from the issue text.

Description

Search before asking
  • I searched the issues and found nothing similar.
Fluss version

1.0.0 (latest release). The same code is on main at 25306d8f1.

Please describe the bug

IcebergLakeCatalog reserves three Iceberg table properties: write.merge.mode,
write.update.mode and write.delete.mode (RESERVED_PROPERTIES). A Fluss table sets these to
merge-on-read when it creates a primary-key table, and alterTable is meant to refuse a change
to any of them.

The check runs on the Fluss key, before the iceberg. prefix is removed:

// fluss-lake/fluss-lake-iceberg-common/src/main/java/org/apache/fluss/lake/iceberg/IcebergLakeCatalog.java
// applyPropertyChanges
checkArgument(
        !RESERVED_PROPERTIES.contains(option.getKey()),        // "iceberg.write.merge.mode"
        "Cannot set table property '%s'",
        option.getKey());
updateProperties.set(
        convertFlussPropertyKeyToIceberg(option.getKey()),     // -> "write.merge.mode"
        option.getValue());

A key arrives with the prefix, so iceberg.write.merge.mode passes the check, and
convertFlussPropertyKeyToIceberg turns it into write.merge.mode, which is then set. The bare
key write.merge.mode is rejected, but a bare key would map to fluss.write.merge.mode and could
never reach the Iceberg property. As a result, the check never blocks a change that would take
effect. ResetOption has the same problem, and a reset removes the property, so the table falls
back to Iceberg's default, copy-on-write.

IcebergLakeCatalogTest.alterReservedTableProperties passes each bare name from
RESERVED_PROPERTIES to alterTable, so it does not cover the prefixed key.

Steps to reproduce

We ran these against apache/fluss:1.0.0 and apache/fluss-gateway:1.0.0, with Iceberg 1.10.1 on
a REST catalog and MinIO.

  1. Create a primary-key table with table.datalake.enabled = true and
    table.datalake.format = iceberg. The Iceberg table holds write.merge.mode,
    write.update.mode and write.delete.mode, all merge-on-read.

  2. Set iceberg.write.merge.mode to copy-on-write. Through the gateway:

    PATCH /v1/clusters/iceberg/databases/q4/tables/t4
    {"changes":[{"kind":"set_config","key":"iceberg.write.merge.mode","value":"copy-on-write"}]}
    

    The request returns 204. The Iceberg table property write.merge.mode becomes
    copy-on-write. The Flink SQL form,
    ALTER TABLE t4 SET ('iceberg.write.merge.mode' = 'copy-on-write'), reaches the same
    alterTable call; we did not run it.

  3. Reset it with {"kind":"reset_config","key":"iceberg.write.merge.mode"}. The request returns
    204, and write.merge.mode is removed from the Iceberg table.

  4. For comparison, set the bare key write.merge.mode. It fails with
    Cannot set table property 'write.merge.mode'.

iceberg.write.update.mode and iceberg.write.delete.mode behave the same way.

Expected

Setting or resetting iceberg.write.merge.mode, iceberg.write.update.mode or
iceberg.write.delete.mode fails with Cannot set table property or
Cannot reset table property, and the Iceberg table is unchanged.

Solution

Check both the key as given and the Iceberg key it converts to. Checking only the converted key
would stop rejecting the bare write.merge.mode, which the existing test expects to fail.

String icebergKey = convertFlussPropertyKeyToIceberg(option.getKey());
checkArgument(
        !isReservedProperty(option.getKey(), icebergKey),
        "Cannot set table property '%s'",
        option.getKey());
updateProperties.set(icebergKey, option.getValue());

private static boolean isReservedProperty(String flussKey, String icebergKey) {
    return RESERVED_PROPERTIES.contains(flussKey) || RESERVED_PROPERTIES.contains(icebergKey);
}

ResetOption takes the same check. Extend alterReservedTableProperties to pass each reserved
name both bare and with the iceberg. prefix, and expect both the set and the reset to fail.

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Dominant language
Java
Stars
2.2k
Forks
656
Avg merge
2d 14h
Merged PRs (30d)
108

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/fluss

All issues in apache/fluss

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.