Thanks! > On 23 Oct 2024, at 18:17, Melanie Plageman <melanieplage...@gmail.com> wrote: > > > Note that you don't check if buf is valid here and break out of the > inner loop when it is invalid.
I've added two asserts to clarify expectations. > > By doing read_stream_reset() before you first invoke > read_stream_next_buffer(), seems like you invalidate the distance set > in read_stream_begin_relation() I've moved reset so happy path have a proper distance. > Since you already advance a block number in the callback, I find it > confusing to also use the block number as a loop condition here. I > think it would be clearer to loop on read_stream_next_buffer() > returning a valid buffer (and then move the progress reporting into > btvacuumpage()). I'll think how to restructure flow there... I've also added a TAP test to check logic of stream resetting. Best regards, Andrey Borodin.
v4-0001-Prototype-B-tree-vacuum-streamlineing.patch
Description: Binary data
v4-0004-Move-reset.patch
Description: Binary data
v4-0003-Add-asserts-to-address-review-feedback.patch
Description: Binary data
v4-0002-Add-TAP-tests-that-verifies-B-tree-vacuum.patch
Description: Binary data