Bug 2257 - Token access times set backward by learning an old message.
Summary: Token access times set backward by learning an old message.
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Sun Solaris
: P2 normal
Target Milestone: 2.60
Assignee: Theo Van Dinter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-24 15:37 UTC by David Koppelman
Modified: 2003-07-29 14:09 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Keep token access time from decreasing. patch None David Koppelman [HasCLA]
my updated version of the suggested patch patch None Theo Van Dinter [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description David Koppelman 2003-07-24 15:37:40 UTC
The sa-learn command sets the access time of tokens to the received time of
the message, even for existing tokens that had been accessed later than the
received time.  This can cause problems when training using an old message.

I'll try to attach a simple patch.  The patch works if toc_sync_counters
never has a reason to set the access time backward, which seems to be true
but I'm new to the code.
Comment 1 David Koppelman 2003-07-24 15:40:03 UTC
Created attachment 1183 [details]
Keep token access time from decreasing.
Comment 2 Theo Van Dinter 2003-07-24 20:46:16 UTC
this should definitely be fixed pre-2.60pr3...
Comment 3 Theo Van Dinter 2003-07-24 23:28:15 UTC
Created attachment 1184 [details]
my updated version of the suggested patch

we typically like diffs in context format, and I wanted to add a comment and
such. :)
Comment 4 Theo Van Dinter 2003-07-24 23:30:35 UTC
just to note: we checked when doing a token touch for this issue, but not when calling 
tok_sync_counters which is called during learn, journal sync, etc.   doh.  so we really need to get 
this in.

thanks for catching this. :)
Comment 5 Theo Van Dinter 2003-07-27 10:24:02 UTC
Can someone please review this patch?  This is pretty much the last thing 
holding up PR3.

Thanks.
Comment 6 David Koppelman 2003-07-27 10:32:35 UTC
I hope I'm not being a pest, but can you look at 2263 before considering another
preview release.  Its impact will be greater than this bug for those who autolearn 
either mostly spam or mostly ham.
Comment 7 Justin Mason 2003-07-28 10:59:57 UTC
+1. sorry, thought I'd already done this.
Comment 8 Theo Van Dinter 2003-07-29 22:09:09 UTC
committed. :)