Earl Hood said:
I've recently set up two mhonarc pages, on one of them (the one which
recieves considerably more traffic) I am seeing message numbers jumping
between 120-160 each time the cron runs.
I looked at your archive, and the message number jump increases
in size each time. I noticed a pattern. The message jump size
can be determined by checking how many messages get added to the
archive during each invocation of mhonarc. Here is a list
of message of some message number jumps with the jump size and
the number of messages added during the add:
Number jump jump size # mesgs added
----------------------------------------------------------------------
1458 -> 1574 116 9
1582 -> 1707 125 4
1710 -> 1839 129 6
1844 -> 1979 135 8
1986 -> 2129 143 5
2133 -> 2281 148 ...
If you will notice, if you add the jump size to the number of messages
added, that will give you the next jump size in the table. At least
the problem is consistent.
Yeah, this gave me the hint after I had a look the .mhonarc.db file.
The problem is that if you use -maxsize X that only the last X msg ids
are remembered in .mhonarc.db. Lets say that you have an mbox with 10
messages and use -maxsize 5. In the first run it would delete msg numb 1-5
mhonarc -outdir test 110msgs.mbox
Rerunning mhonarc on the *same* mbox again with -add
mhonarc -outdir test -add 10msgs.mbox
would create the formerly delelted msg 1-5 as 11-15 and then delete them
again. If a new message would have arrived in the meantime it would get
the msg numb 16. QED :-)
You can see the behaviour with
diff -u -r1.1 ../../2.0a2/mhonarc
--- ../../2.0a2/mhonarc 1996/11/18 16:00:10 1.1
+++ ../../2.0a2/mhonarc 1996/11/18 16:02:00
@@ -855,6 +855,7 @@
&defineIndex2MsgId();
$msgnum = $IndexNum{$key}; return 0 if ($msgnum eq '');
+ print STDERR "Deleting msg # = $msgnum\n";
$filename = $OUTDIR . $DIRSEP . &msgnum_filename($msgnum);
delete $ContentType{$key};
delete $Date{$key};
*Maybe* the solution is as easy as not delete the msg id (see patch below).
The *only* test I did was to rerun mhonarc again and now I got as expected
'No new messages'. Is this enough to fix it? Earl?
David: as a workaround until a well tested patch is out I would suggest to
rename your currently used mbox. For the next 200 messages you then will not
see any message jumping.
Achim
diff -u -r1.1 ../../2.0a2/mhonarc
--- ../../2.0a2/mhonarc 1996/11/18 16:00:10 1.1
+++ ../../2.0a2/mhonarc 1996/11/18 16:13:45
@@ -855,6 +855,7 @@
&defineIndex2MsgId();
$msgnum = $IndexNum{$key}; return 0 if ($msgnum eq '');
+ #print STDERR "Deleting msg # = $msgnum\n";
$filename = $OUTDIR . $DIRSEP . &msgnum_filename($msgnum);
delete $ContentType{$key};
delete $Date{$key};
@@ -862,7 +863,7 @@
delete $IndexNum{$key};
delete $Refs{$key};
delete $Subject{$key};
- delete $MsgId{$Index2MsgId{$key}};
+ #delete $MsgId{$Index2MsgId{$key}};
unlink $filename;
foreach $filename (split(/$X/o, $Derived{$key})) {
unlink "${OUTDIR}${DIRSEP}${filename}";