Skip to content

Core: skip reading large manifest entry fields when not used in ManifestFilterManager#16281

Draft
grantatspothero wants to merge 1 commit intoapache:mainfrom
grantatspothero:gn/manifestFilterManager
Draft

Core: skip reading large manifest entry fields when not used in ManifestFilterManager#16281
grantatspothero wants to merge 1 commit intoapache:mainfrom
grantatspothero:gn/manifestFilterManager

Conversation

@grantatspothero
Copy link
Copy Markdown
Contributor

@grantatspothero grantatspothero commented May 10, 2026

During MergingSnapshotProducer commits, ManifestFilterManager reads and materializes every ManifestEntry in a table to determine if manifests need to be rewritten. However, the common case is only a small fraction of manifests are modified in a commit.

There is already an optimization in place to avoid rewriting manifests which are unchanged, but this PR further improves that optimization by only projecting a lightweight manifestentry that doesn't include stats.

@github-actions github-actions Bot added the core label May 10, 2026
@grantatspothero grantatspothero force-pushed the gn/manifestFilterManager branch from 10fb633 to 72f9947 Compare May 10, 2026 18:16
manifestHasDeletedFiles doesn't read manifest stats when deleteExpression not set
@grantatspothero grantatspothero changed the title Skip reading large manifest entry columns when not used in ManifestFilterManager Core: skip reading large manifest entry fields when not used in ManifestFilterManager May 10, 2026
@grantatspothero grantatspothero force-pushed the gn/manifestFilterManager branch from 72f9947 to 9c0a662 Compare May 10, 2026 23:16
@grantatspothero
Copy link
Copy Markdown
Contributor Author

grantatspothero commented May 11, 2026

The ReplaceDeleteFilesBenchmark doesn't show a difference because it reads files from manifests before passing them to rewriteFiles, so manifestLocation is populated. This triggers the optimization from #11131 that skips scanning manifests entirely.

Some compaction implementations cannot preserve manifestLocation. Any time a content file is serialized/passed across the wire it loses manifestLocation and thus the optimization will never trigger. And there is no public API to set manfestLocation.

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.

1 participant