> On 8 Aug 2024, at 11:32, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
>
> Any feedback would be appreciated.
I've took a look into the patch. It seems to me that you add new block numbers to the read stream until you have buffers. So when there are no more buffers you will still have some queued blocks.
Maybe can you change the logic so that number of free buffers must be enough to allocate all blocks in look-ahead distance?
Thanks!
Best regards, Andrey Borodin.