apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.61k stars 1.02k forks source link

Remove Accountable interface in KnnVectorsReader #13255

Closed Pulkitg64 closed 5 months ago

Pulkitg64 commented 6 months ago

Description

Closes #13241

Remove Accountable interface in KnnVectorsReader and removed ramBytesUsed function from wherever KNNVectorsReader class is used/extended.

jpountz commented 6 months ago

Thanks for looking into this. Can you add an entry to lucene/MIGRATE.txt and lucene/CHANGES.txt under 10.0?

Let's also wait for the discussion to settle on the linked issue as it looks like this change may be controversial.

jpountz commented 6 months ago

Separately, I wonder if removing Accountable on KnnVectorsReader would help remove the Accountable on some other utility classes. For instance, it looks like DirectMonotonicReader.Meta may be such a class, as the fact that it's accountable is only taken advantage of by KnnVectorsReader implementations. (For a separate change.)

jpountz commented 5 months ago

I opened #13280 as a follow-up.