-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When trying to upgrade to 4.0.0-rc.7, my cassandra tests are failing with this stack trace:
Caused by: java.lang.IllegalStateException: Record size mismatch for ordinal 0: expected 2136 bytes, wrote 1736 bytes
at io.github.jbellis.jvector.graph.disk.NodeRecordTask.call(NodeRecordTask.java:171)
at io.github.jbellis.jvector.graph.disk.ParallelGraphWriter.lambda$writeL0Records$0(ParallelGraphWriter.java:217)
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
at --- Async.Stack.Trace --- (captured by IntelliJ IDEA debugger)
at java.base/java.util.concurrent.FutureTask.<init>(FutureTask.java:132)
at java.base/java.util.concurrent.AbstractExecutorService.newTaskFor(AbstractExecutorService.java:108)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:139)
at io.github.jbellis.jvector.graph.disk.ParallelGraphWriter.writeL0Records(ParallelGraphWriter.java:200)
at io.github.jbellis.jvector.graph.disk.OnDiskGraphIndexWriter.writeL0RecordsParallel(OnDiskGraphIndexWriter.java:269)
at io.github.jbellis.jvector.graph.disk.OnDiskGraphIndexWriter.write(OnDiskGraphIndexWriter.java:210)
at org.apache.cassandra.index.sai.disk.vector.CompactionGraph.flush(CompactionGraph.java:532)
... 83 more
The issue seems to be in the ByteBufferIndexWriter#writeFloats. By calling asFloatBuffer(), we're creating a new object with its own position tracking, and as a result, putting the float[] moves the FloatBuffer's position, but not the source Buffer position.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working