$self->{need_checkpoint} // return; # must be defined via local
return ++$self->{need_checkpoint} if $nr >= $self->{batch_bytes};
my $now = now;
- my $next = $self->{next_checkpoint} //= $now + $CHECKPOINT_INTVL;
+ my $next = $self->{next_checkpoint} //= $now +
+ ($self->{-opt}->{'commit-interval'} // $CHECKPOINT_INTVL);
$self->{need_checkpoint} += ($now > $next ? 1 : 0);
}
my $opt = { fsync => 1, scan => 1 }; # --no-scan is hidden
GetOptions($opt, qw(quiet|q verbose|v+ reindex jobs|j=i fsync|sync! dangerous
cow! indexlevel|index-level|L=s join:s@
+ commit-interval|commit=i
batch_size|batch-size=s max_size|max-size=s
include|I=s@ only=s@ all show:s@
project-list=s exclude=s@ project-root|r=s
# index options
qw(verbose|v+ rethread compact|c+ fsync|sync!
indexlevel|index-level|L=s max_size|max-size=s
- batch_size|batch-size=s cow! wal
+ commit-interval|commit=i batch_size|batch-size=s cow! wal
sequential-shard|seq-shard
)) or die $help;
if ($opt->{help}) { print $help; exit 0 };
my $opt = { quiet => -1, compact => 0, fsync => 1, scan => 1 };
GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i
fsync|sync! fast dangerous cow! wal defrag=i
+ commit-interval|commit=i
indexlevel|index-level|L=s max_size|max-size=s
batch_size|batch-size=s
- dedupe:s@ gc commit-interval=i watch scan! dry-run|n
+ dedupe:s@ gc watch scan! dry-run|n
multi-pack-index! all C=s@ help|h))
or die $help;
if ($opt->{help}) { print $help; exit 0 };
GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i prune
fsync|sync! xapian_only|xapian-only dangerous cow! wal
indexlevel|index-level|L=s max_size|max-size=s
- defrag=i batch_size|batch-size=s
+ commit-interval|commit=i defrag=i batch_size|batch-size=s
since|after=s until|before=s
sequential-shard|seq-shard
multi-pack-index!
-eidx_ok => 1, -cidx_ok => 1 };
GetOptions($opt, qw(
cow! fsync|sync! compact|c reshard|R=i
- max_size|max-size=s batch_size|batch-size=s
+ commit-interval|commit=i max_size|max-size=s batch_size|batch-size=s
sequential-shard|seq-shard
jobs|j=i quiet|q verbose|v
blocksize|b=s no-full|n fuller|F