goankur commented on PR #16705:
URL: https://github.com/apache/lucene/pull/16705#issuecomment-5824726082
> A few more places where prefetch silently does nothing:
>
> * `OffHeapFloat16VectorValues` has no prefetch at all, while fp32 and byte
do and the layout is the same. So `ScalarQuantizedFloat16VectorValues` now
forwards into a no-op and the fp16 rescore stays as it was.
> * `ExitableDirectoryReader` wraps the three vector values and forwards
everything except prefetch, so a search with a timeout loses it with no signal.
> * Same in `SortingCodecReader`, though that one only matters on the
sort/merge path.
>
> Maybe worth a test that checks each wrapper forwards, this keeps coming
back.
The three no-ops are fixed. `ExitableDirectoryReader` also throws from
`copy()`, and prefetching uses
a second `copy()` view, so rescoring through a reader with a timeout failed
outright rather than just
losing the prefetch. Those wrappers now copy the delegate; there's a test
that searches through one.
Forwarding tests in two parts, since visibility differs: the quantized,
fp16-quantized and
normalizing wrappers over a recording delegate; `Exitable` and `Sorting`
through a `Directory`
counting `IndexInput#prefetch` per extension, with an unwrapped control.
Verified by deleting one
override at a time and watching the matching test fail.
Two gaps left open:
- `NormalizedFloatVectorValues` is wrapped only on the merge path, never by
`getFloatVectorValues`,
so it has the unit test only.
- `OffHeapScalarQuantizedVectorValues` and its fp16 sibling have no
`prefetch`, so quantized codes
can't be prefetched during traversal. Let me know if that should be fixed
too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]