Skip to content

Remove IOException from LeafReader.getDocValuesSkipper() - #16388

Merged
romseygeek merged 3 commits into
apache:mainfrom
romseygeek:skippers/ioexception
Jul 14, 2026
Merged

Remove IOException from LeafReader.getDocValuesSkipper()#16388
romseygeek merged 3 commits into
apache:mainfrom
romseygeek:skippers/ioexception

Conversation

@romseygeek

Copy link
Copy Markdown
Contributor

All of the global metadata available without calling advance() on a skipper is loaded at Skipper creation time and can therefore be returned without doing any IO. The only reason we need to do IO to create a Skipper is slicing an IndexInput, and that can be done lazily in advance() as skippers are designed to only be consumed in a single thread. This removes the throws declaration from LeafReader.getDocValuesSkipper(), which in combination with a similar change on PointValues will make numeric field metadata available without IO.

All of the global metadata available without calling advance() on a
skipper is loaded at Skipper creation time and can therefore be
returned without doing any IO. The only reason we need to do IO
to create a Skipper is slicing an IndexInput, and that can be done
lazily in advance() as skippers are designed to only be consumed
in a single thread.  This removes the throws declaration from
LeafReader.getDocValuesSkipper(), which in combination with a similar
change on PointValues will make numeric field metadata available
without IO.

@iverase iverase left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@romseygeek
romseygeek merged commit 1593f87 into apache:main Jul 14, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants