Since data going to git is the most important, always ensure
data is written to git before attempting to write anything to
SQLite or Xapian.
sub checkpoint {
my ($self, $wait) = @_;
- if (my $im = $self->{im}) {
- $wait ? $im->barrier : $im->checkpoint;
- }
+ $self->{im}->barrier if $self->{im};
delete $self->{lms};
$self->{priv_eidx}->checkpoint($wait);
}
sub checkpoint ($;$) {
my ($self, $wait) = @_;
- if (my $im = $self->{im}) {
- if ($wait) {
- $im->barrier;
- } else {
- $im->checkpoint;
- }
- }
+ $self->{im}->barrier if $self->{im};
my $shards = $self->{idx_shards};
if ($shards) {
my $dbh = $self->{mm}->{dbh} if $self->{mm};