Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#4,658 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@aphenix-r7 ci sta già lavorando.

Dal 15/10/2026.

  • #4659 di @aphenix-r7 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
data

Direzione di ricerca

Inizia da applyPropertyChanges in fluss-lake/fluss-lake-iceberg-common/.../IcebergLakeCatalog.java, dove il controllo RESERVED_PROPERTIES viene eseguito sulla chiave Fluss prima che convertFlussPropertyKeyToIceberg rimuova il prefisso iceberg.. Il ramo ResetOption richiede lo stesso controllo. Estendi IcebergLakeCatalogTest.alterReservedTableProperties in modo che passi anche ogni nome riservato con il prefisso iceberg.. È completato quando le chiamate di impostazione e di reset con prefisso falliscono con i messaggi esistenti, i casi con la chiave senza prefisso continuano a fallire e la tabella Iceberg resta invariata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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!
Lingua principale
Java
Stelle
2.2k
Fork
656
Merge medio
1g 21h
PR unite (30g)
127

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/fluss

Tutte le issue di apache/fluss

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.