[Mailman-Developers] cron/gate_news watermark == 0

Harald Meland Harald.Meland@usit.uio.no
13 Feb 2000 20:57:20 +0100


[Jim Tittsler]

> A watermark value of 0 is used for two different purposes in cron/gate_news:
>  1. the group has never been gatewayed, so "catch up" to the highest article
>     number
>  2. the highest article number seen for the group is 0 (which can be a valid
>     "high article number" before the first posting in a newly created
>     newsgroup)
> The result of this is the first article posted to the newly created newsgroup
> fails to get gatewayed to the mailing list because the watermark for that
> group is (still) 0 which is used as a flag to "catch up" so all that happens
> is the watermark gets set to 1.
> 
> I believe I have fixed that in my copy by using the value None for the first
> time a group is gatewayed, allowing proper processing when the watermark is
> truly article number 0.

Hmmmm... When checking the contents of my "data/gate_watermarks"
marshal, I find several old mailing lists with an entry stating that
their watermark is 0 -- even though these lists aren't actually gating
any newsgroups.

As all these lists are rather old, I guess this could be how things
were stored in some early Mailman version -- back when gate_news were
forking processes to gate _all_ lists, regardless of whether the list
in question had requested that any gating should be done, and the
watermark file was written to by each and every child...

On checking this with CVS, it appears that revision 1.7 of gate_news
indeed has the behaviour I suspected, while 1.8, which was checked in
1998/12/18 00:22:23, seems to do it "right".

The upshot of this is that any list touch by rev. 1.7 (and maybe
earlier) which do not do any gating would possibly get *all* the
messages present in the group it's gating from posted to it if it
started gating after your patch was applied.


A possible way to approach all this would be to have "make update"
replace those 0 values in gate_watermarks with None values iff there
are no other None values (i.e. only change things on the first time
"make update" is run).

Or, even better, move the per-list watermark info from gate_watermarks
into the list's config.db, replacing any 0 values in gate_watermarks
with None values in config.db.  This has the advantage of reducing the
number of different files that would have to be changed when
cloning/renaming a list.
-- 
Harald