ovdb/groupinfo repair
Bill Davidsen
davidsen at tmr.com
Thu Sep 21 16:35:13 UTC 2006
Another approach would be to have a read mode which Heath Kehoe wrote:
>I'm not aware of a way to fix a too-high high mark, short of a bit of
>hacking.
>
>Fortunately, if you have the source code available, it's pretty easy
>to make a custom version of expireover that can fix the high mark.
>
>You just need a couple of small changes to storage/ovdb/ovdb.c (be
>sure to save a copy of the original before editing):
>
>About line 1071 (in the count_records function), after the three
>memset(...) lines, put:
>
> gi->high = 0;
>
>The count_records function will only increase the high mark; so this
>initializes it to zero before iterating over the articles.
>
>Then at about line 2718, you should see these lines:
>
> if(currentcount != gi.count) {
> syslog(L_NOTICE, "OVDB: expiregroup: recounting %s", group);
>
>Change the if(...) to look like this, so that count_records will be
>called unconditionally:
>
> if(1) {
> syslog(L_NOTICE, "OVDB: expiregroup: recounting %s", group);
>
>
>Then rebuild libstorage and expireover:
>
> cd storage
> make
> cd ../expire
> make expireover
> mv expireover expireover-fix-himark
>
>Then, run the custom expireover to fix individual groups like this
>(you don't have to shut down innd first):
>
> su news # unless you're already logged in as the news user
> echo "alt.support.diet.low-carb" | ./expireover-fix-himark -f -
>
>
>Don't forget to put the original ovdb.c back in place. You don't
>normally want to use the modified version of expireover; for one, we
>forced it to always recount each group, which could add significantly
>to the runtime; also, you don't normally want to allow the high mark
>to decrease.
>
This would probably be best as an option, so it could be used when
needed. Easier than keeping a custom version and hoping people will be
able to find the patch in the rare case when you need it.
--
bill davidsen <davidsen at tmr.com>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
More information about the inn-workers
mailing list