diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2018-08-01 11:43:44 -0500 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2018-08-03 20:04:29 +0000 |
commit | 72fa722146912781230c54d7282bf7c1147e0455 (patch) | |
tree | 6d3c672a86d2cbd311147c8664ac33df12f0a212 /lib | |
parent | 65820d88976bc2fa83e9acd3b460ac304578d40a (diff) | |
download | public-inbox-72fa722146912781230c54d7282bf7c1147e0455.tar.gz |
Now that we track the num highwater mark it is safe to remove messages from msgmap that have been previously allocated. Removing even the highest numbered article will no longer cause new message numbers to move backwards. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 4dd14331..0396d9f5 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -842,7 +842,10 @@ sub unindex_oid { warn "BUG: multiple articles linked to $oid\n", join(',',sort keys %gone), "\n"; } - $self->{unindexed}->{$_}++ foreach keys %gone; + foreach my $num (keys %gone) { + $self->{unindexed}->{$_}++; + $self->{mm}->num_delete($num); + } $self->unindex_oid_remote($oid, $mid); } } |