]> Sergey Matveev's repositories - public-inbox.git/commitdiff
www: fix ref cycle from threading w/ extindex
authorEric Wong <e@80x24.org>
Mon, 4 Oct 2021 00:07:17 +0000 (19:07 -0500)
committerEric Wong <e@80x24.org>
Mon, 4 Oct 2021 03:36:28 +0000 (03:36 +0000)
Unlike v1 inboxes (which don't accept duplicate Message-IDs at
all), and v2 inboxes (which generate a new Message-ID for
duplicates), extindex must accept duplicate Message-IDs as-is.

This was fine for storage, but prevented the reference-cycle
mechanism of our message threading display algorithm from working
reliably.  It could no longer delete the ->{parent} field from
clobbered entries in the %id_table.

So we now take into account reused Message-IDs and never clobber
entries in %id_table.  Instead, we mark reused Message-IDs as
"imposters" and special-case them by injecting them as children
after all other threading is complete.

This cycle was noticed using a pre-release of Devel::Mwrap::PSGI:
  https://80x24.org/mwrap-perl.git


No differences found