Views: no mechanism to control or garbage-collect the number of `metadata.json` files

Aperta
#18,327 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@adiranjan25 ci sta già lavorando.

Dal 2/10/2026.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
java, spark

Direzione di ricerca

Start by reproducing the repeated CREATE OR REPLACE VIEW sequence with the two metadata cleanup properties, then inspect how view metadata files are written and replaced. Use the listed object-storage paths to verify current behavior; done should include a defined retention or garbage-collection mechanism for view metadata files and coverage for the reproduction.

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

Descrizione

question
Query engine

Apache Iceberg version 1.10.1 (iceberg-spark-runtime-4.0_2.13),
Spark 4.0.1,
REST catalog (Apache Polaris)

Question

Table metadata files can be automatically cleaned up after commits via
write.metadata.delete-after-commit.enabled + write.metadata.previous-versions-max.
Views accept these properties, but they appear to have no effect: view metadata
files (*.metadata.json under the view location) accumulate indefinitely.

Is there an intended mechanism to control the number of view metadata files?
If not, this is a feature request: view metadata retention/garbage collection.

Reproduction
  1. Create a view with the cleanup properties:
    CREATE OR REPLACE VIEW iceberg.ns.my_view
    TBLPROPERTIES (
      'write.metadata.delete-after-commit.enabled' = 'true',
      'write.metadata.previous-versions-max' = '10'
    ) AS SELECT ...;
    
    
  2. Repeatedly run CREATE OR REPLACE VIEW with the same SQL (e.g. 20 times).
  3. List the view location on object storage:

s3://bucket/ns/my_view/metadata/00001-...metadata.json
s3://bucket/ns/my_view/metadata/00002-...metadata.json
...
s3://bucket/ns/my_view/metadata/00029-...metadata.json # > previous-versions-max

Lingua principale
Java
Stelle
9.4k
Fork
3.7k
Merge medio
2g 16h
PR unite (30g)
160

Preparare l'ambiente

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/iceberg

Tutte le issue di apache/iceberg

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.