strat97 opened a new issue, #18327:
URL: https://github.com/apache/iceberg/issues/18327
### 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:
```sql
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]