Hello folks, I was trying to build a custom off-heap buffer cache on top of Lucene's DirectIODirectory. To keep memory bounded and avoid allocating (and freeing via Cleaner/GC) an off-heap buffer on every miss, I was looking into recycling block buffers from a freelist instead of allocating on every miss. To do that I need to know that a buffer is no longer referenced by any live IndexInput(clones and slices). So was looking at a reference-counting based mechanism for that, but it would need close() to be called on cloned/sliced IndexInputs, and I am not sure that's possible today.
Has anyone looked into this i.e. a refcounted or recycled buffer cache on top of DirectIODirectory? Any help/advice is appreciated. Thanks, Sagar
