Hi, On Tue, 1 Apr 2025 at 05:14, Melanie Plageman <melanieplage...@gmail.com> wrote: > > On Mon, Mar 31, 2025 at 3:45 PM Melanie Plageman > <melanieplage...@gmail.com> wrote: > > > > Whoops, this isn't right. It does work. I'm going to draft a version > > suggesting slightly different variable naming and a couple comments to > > make this more clear. > > Okay, so after further study, I think there are multiple issues still > with the code. We could end up comparing a blocknumber to nblocks > calculated from a different fork. To address this, you'll need to keep > track of the last fork_number. At that point, you kind of have to > bring back old_blk -- because that is what we are recreating with > multiple local variables.
I am attaching v8, which is an updated version of the v7. I tried to get rid of these local variables and refactored code to make logic more straightforward instead of going back and forth. 0001 and 0002 are v8. 0003 is another refactoring attempt to make code more straightforward. I did not squash 0003 to previous patches as you might not like it. -- Regards, Nazir Bilal Yavuz Microsoft
v8-0001-Optimize-autoprewarm-with-read-streams.patch
Description: Binary data
v8-0002-Count-free-buffers-at-the-start-of-the-autoprewar.patch
Description: Binary data
v8-0003-Refactor-code-more.patch
Description: Binary data