Re: (partial?) fix for: Re: Newbie Q? - Message Jumping

1997-01-14 17:37:15
(Reply about the message number jumping problem)

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 :-)

*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?

That's tough since the %MsgId hash is used throughout code and
each portion of the code must be checked that accesses the %MsgId
hash to see if removed ids would cause a problem.

What might be a cleaner approach is to store all removed ids
into a separate hash?  This hash can be used in conjuction with
%MsgId to see if a message has been processed before.  The only
problem with this, or your, fix is that the database will be
always be increasing in size.  A purge removed ids option may need
to be added to allow the saving of space when removed ids are no
longer required.


<Prev in Thread] Current Thread [Next in Thread>