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

Đang mở
#18,327 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@adiranjan25 đang làm issue này rồi.

Từ ngày 2/10/2026.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
java, spark

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Java
Star
9.4k
Fork
3.7k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
169

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/iceberg

Tất cả issue của apache/iceberg

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.