From 66e91d22b9899aaf5baea05b5e1652a35472b966 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Fri, 30 Mar 2018 01:20:44 +0000 Subject: v2writable: go backwards through alternate Message-IDs This is consistent with how we internally generate new Message-IDs to break conflicts and allows ->reindex to succeed while walking backwards through history --- lib/PublicInbox/V2Writable.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 269b028f..34f13e26 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -137,7 +137,7 @@ sub num_for { warn "<$mid> reused for mismatched content\n"; # try the rest of the mids - foreach my $i (1..$#$mids) { + for(my $i = $#$mids; $i >= 1; $i--) { my $m = $mids->[$i]; $num = $self->{skel}->{mm}->mid_insert($m); if (defined $num) { -- cgit v1.2.3-24-ge0c7