expireover
Expire entries from the news overview database
- Provided by: inn2 (Version: 2.7.4-1)
- Report a bug
Expire entries from the news overview database
expireover [-ekNpqs] [-f file] [-w offset] [-z rmfile] [-Z lowmarkfile]
expireover expires old entries from the news overview database. It reads in a list of newsgroups (by default from pathdb/active, but a different file can be specified with the -f option) and then removes from the overview database mentions of any articles that no longer exist in the news spool.
If groupbaseexpiry in inn.conf is true, expireover also removes old articles from the news spool according to the expiration rules in expire.ctl. Otherwise it only removes overview entries for articles that have already been removed by some other process, and -e, -k, -N, -p, -q, -w, and -z are all ignored.
When expiretombstone and groupbaseexpiry are enabled in inn.conf, expireover appends each cancelled token to expireover.tombstone.NEW in pathdb under an exclusive POSIX lock, and atomically renames the file into place on a clean run. In delayrm mode (-z), the rename is performed by expirerm after fastrm succeeds. The next expire run consumes this log to skip per-article storage existence checks. See inn.conf(5) under expiretombstone.
When groupbaseexpiry is set, the default behavior of expireover is to remove the article from the spool once it expires out of all of the newsgroups to which it was crossposted. The article is, however, removed from the overview database of each newsgroup as soon as it expires out of that individual newsgroup. The effect is that an article crossposted to several groups will be removed from the overview database from each group one-by-one as its age passes the expiration threshold for that group as set in expire.ctl, and then when it expires out of the last newsgroup, it will be deleted from the news spool.
Articles that are stored in self-expiring storage backends such as CNFS are normally treated differently and not expired until they expire out of the backend regardless of expire.ctl. See -N, however.
By default, expireover purges all overview information for newsgroups that have been removed from the server; this behavior is suppressed if -f is given.
To speed up the existence check for each article, expireover builds a Bloom filter from the history file at startup. This replaces per-article random I/O into the history file with a single sequential read, which is critical for large spools. The Bloom filter is a positive-only cache: if it reports an article probably exists, the slow history lookup is skipped. If it reports the article is not found, expireover falls back to a direct history lookup for correctness. False positives (the Bloom filter incorrectly reporting an article exists) are benign; the orphaned overview entry will be cleaned up on the next expiration run.
The false positive rate and memory usage of the Bloom filter are controlled by the expirebloomfp setting in inn.conf. Setting it to "0" disables the Bloom filter. The Bloom filter is also disabled when the -s flag is used.
Normally expireover is invoked from news.daily(8), which handles such things as processing the rmfile and lowmarkfile if necessary. Sometimes it's convenient to manually expire a particular newsgroup, however. This can be done with a command like:
echo example.test | expireover -f - -Z <pathtmp in inn.conf>/lowmark
ctlinnd lowmark <pathtmp>/lowmark
This can be particularly useful if a lot of articles in a particular group have expired but the overview information is still present, causing some clients to see a lot of "this article may have been cancelled" messages when they first enter the newsgroup.
Written by Rob Robertson <rob@violet.berkeley.edu> and Rich $alz <rsalz@uunet.uu.net> (with help from Dave Lawrence <tale@uunet.uu.net>) for InterNetNews.
active(5), ctlinnd(8), expire(8), expire.ctl(5), inn.conf(5), news.daily(8).