Lucene: preserve throwable types in accelerated vector formats - #2515
Open
shaunakkapur wants to merge 3 commits into
Open
Lucene: preserve throwable types in accelerated vector formats#2515shaunakkapur wants to merge 3 commits into
shaunakkapur wants to merge 3 commits into
Conversation
|
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. |
Author
|
/ok to test e3b67f1 |
Author
|
/ok to test 358def4 |
shaunakkapur
marked this pull request as ready for review
August 27, 2026 23:08
shaunakkapur
marked this pull request as draft
August 28, 2026 02:01
shaunakkapur
marked this pull request as ready for review
August 28, 2026 02:12
imotov
reviewed
Aug 28, 2026
imotov
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Left one comment.
| } catch (Exception e) { | ||
| throw new RuntimeException(e.getMessage()); | ||
| Utils.handleThrowable(e); | ||
| throw new AssertionError("handleThrowable always throws"); // unreachable |
Contributor
There was a problem hiding this comment.
I don't think we need these assertions. You already have assertThrows in the test, and it ensures that we don't swallow an exception in these methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
The call site tests were also run against the previous wrappers and correctly failed for IOException and RuntimeException identity.
Closes #2474