You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "unikdahal (via GitHub)" <gi...@apache.org> on 2026/09/17 18:04:37 UTC
[I] Core: View metadata retains schemas no longer referenced by retained versions [iceberg]
unikdahal opened a new issue, #18155:
URL: https://github.com/apache/iceberg/issues/18155
### Apache Iceberg version
1.10.0
### Query engine
Spark
### Please describe the bug 🐞
We observed this with Iceberg views through a REST catalog backed by Apache Polaris.
`ViewMetadata.Builder.build()` correctly limits retained view versions using `version.history.num-entries`, but schemas referenced only by expired versions remain in `schemas`.
For example, with history size `2`:
```text
v1 -> schema 1
v2 -> schema 2
v3 -> schema 3
v4 -> schema 4
```
The retained versions may correctly be:
```text
v3 -> schema 3
v4 -> schema 4
```
while the current metadata still contains schemas `1, 2, 3, 4`.
For frequently replaced views, this causes the current metadata JSON to grow continuously even though version history is bounded.
I think schemas should be retained based on reachability from the retained `ViewVersion`s. After version retention, only schemas referenced by retained versions should remain. This also preserves shared schemas and the current version's schema naturally.
### Willingness to contribute
- [x] I can contribute a fix for this bug independently
- [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- [ ] I cannot contribute a fix for this bug at this time
--
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: issues-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Core: View metadata retains schemas no longer referenced by retained versions [iceberg]
Posted by "unikdahal (via GitHub)" <gi...@apache.org>.
unikdahal commented on issue #18155:
URL: https://github.com/apache/iceberg/issues/18155#issuecomment-5719022604
take
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org