Skip to content

Lucene: preserve throwable types in accelerated vector formats - #2515

Merged
rapids-bot[bot] merged 8 commits into
NVIDIA:mainfrom
shaunakkapur:codex/lucene-propagate-errors
Aug 28, 2026
Merged

rapids-bot[bot] merged 8 commits into
NVIDIA:mainfrom
shaunakkapur:codex/lucene-propagate-errors

Conversation

@shaunakkapur

@shaunakkapur shaunakkapur commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replace the broad RuntimeException wrappers in fieldsWriter and fieldsReader across the plain, scalar quantized, and binary quantized accelerated vector formats with Utils.handleThrowable.

This preserves IOException, RuntimeException, and Error instances instead of discarding their type, cause, and stack information. It also documents and tests the shared Error propagation contract.

Add focused helper and vector format regression coverage. The call site tests verify that IOException and RuntimeException instances are propagated unchanged, while the helper test verifies exact Error identity.

Testing

  • TestUtilsThrowableHandling: 4 tests passed
  • TestAcceleratedHNSWVectorsFormatThrowableHandling: 3 tests passed
  • Spotless check passed
  • git diff check passed

The call site tests were also run against the previous wrappers and correctly failed for IOException and RuntimeException identity.

Closes #2474

@copy-pr-bot

copy-pr-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@shaunakkapur

Copy link
Copy Markdown
Contributor Author

/ok to test e3b67f1

@shaunakkapur shaunakkapur changed the title Lucene: add Error propagation regression coverage Lucene: preserve throwable types in accelerated vector formats Aug 27, 2026
@shaunakkapur

Copy link
Copy Markdown
Contributor Author

/ok to test 358def4

@shaunakkapur
shaunakkapur marked this pull request as ready for review August 27, 2026 23:08
@shaunakkapur
shaunakkapur requested a review from a team as a code owner August 27, 2026 23:08
@imotov imotov added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Aug 27, 2026
@shaunakkapur
shaunakkapur marked this pull request as draft August 28, 2026 02:01
@shaunakkapur
shaunakkapur marked this pull request as ready for review August 28, 2026 02:12

@imotov imotov 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.

Looks good to me. Left one comment.

Utils.handleThrowable now returns RuntimeException so callers can
write `throw Utils.handleThrowable(e)`, letting the compiler verify
the catch block always completes abruptly. This removes the
redundant `throw new AssertionError(...)` line flagged in review,
while relying on existing assertThrows coverage to confirm
exceptions are not swallowed.

Signed-off-by: Shaunak Kapur <shaunakk@nvidia.com>
Signed-off-by: Shaunak Kapur <shaunakk@nvidia.com>
Signed-off-by: Shaunak Kapur <shaunakk@nvidia.com>
The GPUKnnFloatVectorQuery change is unrelated to this PR's scope
(propagating Error subclasses instead of wrapping them). It addresses a
separate pre-existing bug on main where the multi-partition GPU rewrite
path bypasses Lucene's exact-search fallback for highly selective
filters, which surfaces as an intermittent TestCuVSGaps failure on
certain randomized seeds.

Reverting it here per review feedback; tracked separately in its own
issue so it can be reviewed on its own merits.

Signed-off-by: Shaunak Kapur <shaunakk@nvidia.com>
@imotov

imotov commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit d258090 into NVIDIA:main Aug 28, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lucene: Propagate Error subclasses unchanged instead of indiscriminately wrapping in RuntimeException

2 participants