diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-02 00:04:53 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-02 00:05:40 +0000 |
commit | 87425172fb480214c3f72e0174f4f8f15f48d92d (patch) | |
tree | a202bc415b37eba1613d23e7b65faef471e1f3af /lib/PublicInbox/OverIdxFork.pm | |
parent | 35ff6bb106909b1c1232666a9792156dfa398ea8 (diff) | |
download | public-inbox-87425172fb480214c3f72e0174f4f8f15f48d92d.tar.gz |
searchidx_checkpoint was too convoluted and confusing. Since barrier is mostly the same thing; use that instead and add an fsync option for the overview DB.
Diffstat (limited to 'lib/PublicInbox/OverIdxFork.pm')
-rw-r--r-- | lib/PublicInbox/OverIdxFork.pm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/PublicInbox/OverIdxFork.pm b/lib/PublicInbox/OverIdxFork.pm index f4f7cddd..ec965280 100644 --- a/lib/PublicInbox/OverIdxFork.pm +++ b/lib/PublicInbox/OverIdxFork.pm @@ -135,9 +135,12 @@ sub barrier_init { sub barrier_wait { my ($self) = @_; - my $bw = $self->{barrier_wait} or return; - my $l = $bw->getline; - $l eq "barrier_done\n" or die "bad response from barrier_wait: $l\n"; + if (my $bw = $self->{barrier_wait}) { + my $l = $bw->getline; + $l eq "barrier_done\n" or die "bad response from barrier_wait: $l\n"; + } else { + $self->commit_lazy; + } } sub remote_commit { @@ -174,10 +177,4 @@ sub remote_close { } } -sub commit_fsync { - my ($self) = @_; - return if $self->{w}; # don't bother; main parent can also call this - $self->SUPER::commit_fsync; -} - 1; |