> On 3 Apr 2025, at 21:25, Melanie Plageman <melanieplage...@gmail.com> wrote:
> 
> On Thu, Apr 3, 2025 at 11:17 AM Heikki Linnakangas <hlinn...@iki.fi> wrote:
>> 
>> I had a quick look at this. Looks good overall

Same here, this seemed like a good piece to bite into with my limited AIO
knowledge to learn more, and reading it over it seems like a good change.

A few small comments:

+    * `pos` is the read stream callback's index into block_info. Because the
I'm not a fan of markdown in code comments (also in a few more places).


+                       /* Time to try and open our new found relation */
s/new found/newfound/


+   while (p->pos < apw_state->prewarm_stop_idx)
+   {
+       BlockInfoRecord blk = p->block_info[p->pos];
+
+       CHECK_FOR_INTERRUPTS();
Isn't checking inside this loop increasing the frequency of checks compared to
the current version?


+           Assert(read_stream_next_buffer(stream, NULL) == InvalidBuffer);
Is there a non programmer-error case where this can happen?  The Assert right
after a loop around the same function seems to imply there is a race or toctou
case which if so could use a comment.

--
Daniel Gustafsson



Reply via email to