]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
index+xcpdb: rename `--no-sync' to `--no-fsync'
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index a1baa65bd2945dcc8885fc70735a1d60ecd5853b..2248973131d16ba690ce42c68be7082ee8e270c7 100644 (file)
@@ -67,7 +67,7 @@ sub new {
                $self->{lock_path} = "$inboxdir/ssoma.lock";
                my $dir = $self->xdir;
                $self->{over} = PublicInbox::OverIdx->new("$dir/over.sqlite3");
-               $self->{over}->{-no_sync} = 1 if $ibx->{-no_sync};
+               $self->{over}->{-no_fsync} = 1 if $ibx->{-no_fsync};
                $self->{index_max_size} = $ibx->{index_max_size};
        } elsif ($version == 2) {
                defined $shard or die "shard is required for v2\n";
@@ -138,7 +138,7 @@ sub idx_acquire {
                }
        }
        return unless defined $flag;
-       $flag |= $DB_NO_SYNC if $self->{ibx}->{-no_sync};
+       $flag |= $DB_NO_SYNC if $self->{ibx}->{-no_fsync};
        my $xdb = eval { ($X->{WritableDatabase})->new($dir, $flag) };
        if ($@) {
                die "Failed opening $dir: ", $@;
@@ -389,7 +389,7 @@ sub _msgmap_init ($) {
        die "BUG: _msgmap_init is only for v1\n" if $self->{ibx_ver} != 1;
        $self->{mm} //= eval {
                require PublicInbox::Msgmap;
-               my $rw = $self->{ibx}->{-no_sync} ? 2 : 1;
+               my $rw = $self->{ibx}->{-no_fsync} ? 2 : 1;
                PublicInbox::Msgmap->new($self->{ibx}->{inboxdir}, $rw);
        };
 }