]> Sergey Matveev's repositories - public-inbox.git/commit
searchidx: use Perl truthiness to detect XAPIAN_FLUSH_THRESHOLD
authorEric Wong <e@yhbt.net>
Fri, 7 Aug 2020 10:52:17 +0000 (10:52 +0000)
committerEric Wong <e@yhbt.net>
Fri, 7 Aug 2020 23:46:14 +0000 (23:46 +0000)
commit6fcad67f0dbaf33b354f07aa7f3c8fcfc8685bd7
tree93aee2c786eec1540bf56587a2f2ff168c987928
parent9030233f83bc2e30f9529ea484da123ea9d98119
searchidx: use Perl truthiness to detect XAPIAN_FLUSH_THRESHOLD

XAPIAN_FLUSH_THRESHOLD is a C string in the environment, so
users may be tempted to assign an empty string in in their
shell, e.g. `XAPIAN_FLUSH_THRESHOLD= <command>' instead of using
`unset' POSIX shell built-in.

With either a value of "0" or "" (empty string), Xapian will
fall back to its default (10000 documents), which causes grief
for memory-starved users.
lib/PublicInbox/SearchIdx.pm