]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/V2Writable.pm
Msgmap.pm: Track the largest value of num ever assigned
[public-inbox.git] / lib / PublicInbox / V2Writable.pm
index 934640eb672ccfa3d57b5caa84c3628df8bbcfb3..c450980c8f51dbb86357602010fa5b1eab455d27 100644 (file)
@@ -879,9 +879,9 @@ sub index_sync {
        my $mm_tmp = $self->{mm}->tmp_clone;
        my $ranges = $opts->{reindex} ? [] : $self->last_commits($epoch_max);
 
-       my ($min, $max) = $mm_tmp->minmax;
+       my $high = $self->{mm}->num_highwater();
        my $regen = $self->index_prepare($opts, $epoch_max, $ranges);
-       $$regen += $max if $max;
+       $$regen += $high if $high;
        my $D = {}; # "$mid\0$cid" => $oid
        my @cmd = qw(log --raw -r --pretty=tformat:%H
                        --no-notes --no-color --no-abbrev --no-renames);