diff options
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 2 | ||||
-rwxr-xr-x | script/public-inbox-index | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 3f197973..e7fdae48 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -54,7 +54,7 @@ sub new { }, __PACKAGE__; $self->{shards} = $self->count_shards || nproc_shards($opt->{creat}); my $oidx = PublicInbox::OverIdx->new("$self->{xpfx}/over.sqlite3"); - $oidx->{-no_fsync} = 1 if $opt->{-no_fsync}; + $self->{-no_fsync} = $oidx->{-no_fsync} = 1 if !$opt->{fsync}; $self->{oidx} = $oidx; $self } diff --git a/script/public-inbox-index b/script/public-inbox-index index a17bf615..c68f9224 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -85,7 +85,7 @@ for my $ei_name (@$update_extindex) { die "extindex `$ei_name' not configured or found\n"; } $eidx_seen{$topdir} //= - push(@eidx, PublicInbox::ExtSearchIdx->new($topdir)); + push(@eidx, PublicInbox::ExtSearchIdx->new($topdir, $opt)); } my $mods = {}; my @eidx_unconfigured; @@ -141,7 +141,6 @@ EOL $eidx->attach_inbox($ibx); } } -$opt->{-no_fsync} = 1 if !$opt->{fsync}; my $pr = $opt->{-progress}; for my $eidx (@eidx) { $pr->("indexing $eidx->{topdir} ...\n") if $pr; |