diff options
author | Eric Wong <e@80x24.org> | 2022-03-07 10:57:37 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-03-08 00:30:03 +0000 |
commit | 3eec2f7792040f75f3988c520f308e2445baf645 (patch) | |
tree | e581cdd77765c84ae870999f36193e4302f5df71 /lib/PublicInbox/MiscIdx.pm | |
parent | 798bd392d273735a69f0b009e70d8bb2dbc4a7e4 (diff) | |
download | public-inbox-3eec2f7792040f75f3988c520f308e2445baf645.tar.gz |
This enables Xapian::DB_DANGEROUS to support in-place updates. This can speed up the initial index and reduce I/O at the cost of preventing concurrent readers and being unsafe in the face of any abnormal terminations. This is more dangerous than --no-fsync. --no-fsync is only unsafe in the event of a power loss or kernel crash; --dangerous is unsafe even on SIGKILL.
Diffstat (limited to 'lib/PublicInbox/MiscIdx.pm')
-rw-r--r-- | lib/PublicInbox/MiscIdx.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/MiscIdx.pm b/lib/PublicInbox/MiscIdx.pm index dc15442d..5faf5c66 100644 --- a/lib/PublicInbox/MiscIdx.pm +++ b/lib/PublicInbox/MiscIdx.pm @@ -31,6 +31,7 @@ sub new { PublicInbox::Syscall::nodatacow_dir($mi_dir); my $flags = $PublicInbox::SearchIdx::DB_CREATE_OR_OPEN; $flags |= $PublicInbox::SearchIdx::DB_NO_SYNC if $eidx->{-no_fsync}; + $flags |= $PublicInbox::SearchIdx::DB_DANGEROUS if $eidx->{-dangerous}; $json //= PublicInbox::Config::json(); bless { mi_dir => $mi_dir, |