Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#4,658 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@aphenix-r7 がすでに取り組んでいます。

2026年10月15日 から。

  • #4659 @aphenix-r7 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
data

調査の方向性

fluss-lake/fluss-lake-iceberg-common/.../IcebergLakeCatalog.java の applyPropertyChanges から始めてください。ここでは、convertFlussPropertyKeyToIceberg が iceberg. プレフィックスを取り除く前に、Fluss のキーに対して RESERVED_PROPERTIES のチェックが実行されます。ResetOption のブランチにも同じチェックが必要です。IcebergLakeCatalogTest.alterReservedTableProperties を拡張して、予約名のそれぞれを iceberg. プレフィックス付きでも渡すようにしてください。プレフィックス付きの設定およびリセットの呼び出しが既存のメッセージで失敗し、プレフィックスなしのキーのケースが引き続き失敗し、Iceberg テーブルが変更されないことを確認できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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!
主要言語
Java
スター
2.2k
フォーク
658
平均マージ
2日 23時間
マージ済み PR(30日)
101

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/fluss のほかの issue

apache/fluss の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。