leaves12138 commented on code in PR #62:
URL:
https://github.com/apache/paimon-vector-index/pull/62#discussion_r3651750795
##########
jni/src/stream.rs:
##########
@@ -166,3 +223,30 @@ impl paimon_vindex_core::io::SeekWrite for JniOutputStream
{
self.pos
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn jni_seekable_stream_is_cloneable_for_parallel_diskann_batch() {
+ fn assert_clone<T: Clone>() {}
+ assert_clone::<JniSeekableStream>();
+ }
+
+ #[test]
+ fn jni_range_calls_are_bounded_to_one_local_reference_frame() {
Review Comment:
The input path now bounds local references, but the JNI output path still
retains one `JByteArray` local reference per `write_all` call until the whole
native `writeIndex` frame returns. I reproduced this with a one-vector IVF-FLAT
index and `nlist=50,000`; under `-Xcheck:jni`, the local-reference count grew
past 69,000 before the run timed out. The offset table alone triggers multiple
writes per list. Could `write_all` use a bounded local frame or explicitly
`delete_local_ref(jbuf)` after `call_method`?
--
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]