From 5759c29ba5e0c8b2b1135e528e133dc7dde219f8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 21 Jun 2020 00:21:33 +0000 Subject: init: add --skip-artnum parameter For archivists with only newer mail archives, this option allows reserving reserve NNTP article numbers for yet-to-be-archived old messages. Indexers will need to be updated to support this feature in future commits. -V1 inboxes will now be initialized with SQLite and Xapian support if this option is used, or if --indexlevel= is specified. --- lib/PublicInbox/V2Writable.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/V2Writable.pm') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 91379431..a0f041dd 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -128,12 +128,13 @@ sub new { # public (for now?) sub init_inbox { - my ($self, $shards, $skip_epoch) = @_; + my ($self, $shards, $skip_epoch, $skip_artnum) = @_; if (defined $shards) { $self->{parallel} = 0 if $shards == 0; $self->{shards} = $shards if $shards > 0; } $self->idx_init; + $self->{mm}->skip_artnum($skip_artnum) if defined $skip_artnum; my $epoch_max = -1; git_dir_latest($self, \$epoch_max); if (defined $skip_epoch && $epoch_max == -1) { -- cgit v1.2.3-24-ge0c7