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

Abierto
#18,327 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@adiranjan25 ya está trabajando en esto.

Desde el 2/10/2026.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
java, spark

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Java
Estrellas
9.4k
Forks
3.7k
Merge medio
2 d 15 h
PR fusionados (30 d)
169

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/iceberg

Todos los issues de apache/iceberg

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.