about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-25 10:21:13 +0000
committerEric Wong <e@80x24.org>2020-12-26 06:22:56 +0000
commit66518051763825d491d0c1df6837d4266edc180a (patch)
tree9ee471f272ad740ca3027b718ce265e3cf3017f4
parentfb4dd7fdeeed8478cda9b7e63e56564da8cbdacf (diff)
downloadpublic-inbox-66518051763825d491d0c1df6837d4266edc180a.tar.gz
Negation in flag names are confusing, but trying to deviate from
the DB_NO_SYNC name used by Xapian is also confusing.
-rw-r--r--lib/PublicInbox/ExtSearchIdx.pm2
-rwxr-xr-xscript/public-inbox-index3
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;