Skip to content

Core: Prune schemas referenced only by expired view versions - #18157

Open
unikdahal wants to merge 1 commit into
apache:mainfrom
unikdahal:fix/view-schema-retention
Open

unikdahal wants to merge 1 commit into
apache:mainfrom
unikdahal:fix/view-schema-retention

Conversation

@unikdahal

@unikdahal unikdahal commented Sep 17, 2026

Copy link
Copy Markdown

Closes #18155.

ViewMetadata.Builder limits retained view versions using version.history.num-entries, but previously kept schemas referenced only by versions that were expired. This could cause view metadata to grow over repeated view replacements with evolving schemas.

This change prunes schemas that are referenced only by expired view versions while preserving schemas referenced by retained versions and standalone schemas that are not associated with any view version.

Adds regression coverage for schema retention across version expiration, shared schemas, standalone schemas, current versions, and REST-style metadata updates.

AI Disclosure

Model: GPT-5.6 Sol
Platform/Tool: Codex
Human Oversight: reviewed fully
Prompt Summary: Implement and review a fix to prune view schemas referenced only by expired view versions while preserving retained and standalone schemas.

Prune schemas referenced only by expired view versions while preserving schemas used by retained versions and standalone schemas.
@github-actions github-actions Bot added the core label Sep 17, 2026
@unikdahal

Copy link
Copy Markdown
Author

@nastra @huaxingao when you get a chance, could you please take a look at this? Thanks!

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kudos for much testing here @unikdahal! The logic looks good and safe here, let's wait for further review from expert committers as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Core: View metadata retains schemas no longer referenced by retained versions

2 participants