about summary refs log tree commit homepage
path: root/lib/PublicInbox/V2Writable.pm
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-08-01 11:43:43 -0500
committerEric Wong <e@80x24.org>2018-08-03 20:04:29 +0000
commit65820d88976bc2fa83e9acd3b460ac304578d40a (patch)
treea08d7d3ff1c2f0510ffb4f690fc335aa158b7e68 /lib/PublicInbox/V2Writable.pm
parent3f189032fb2d7c8a9dda732e0263e697ce1cb0ac (diff)
downloadpublic-inbox-65820d88976bc2fa83e9acd3b460ac304578d40a.tar.gz
The lookup to see if a num has already been assigned to a message
happens in a temporary copy of message map.  It is possible that the
number has been removed from the current message map.  The
unindex/reindex after a history rewrite triggered by a purge should be
one such case.  Therefore add the number to the msgmap in case it is
not currently present.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r--lib/PublicInbox/V2Writable.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 92d2672c..4dd14331 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -676,6 +676,7 @@ sub reindex_oid {
                 if (defined $n && $n > $num) {
                         $mid0 = $mid;
                         $num = $n;
+                        $self->{mm}->mid_set($num, $mid0);
                 }
         }
         if (!defined($mid0) && $regen && !$del) {