https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6203
--- Comment #12 from Mark Martinec <[email protected]> 2009-11-24 08:41:15 UTC --- Bug 6203: make AWL CIDR mask configurable: auto_whitelist_ipv4_mask_len and auto_whitelist_ipv6_mask_len; update README.awl and sql/awl_*.sql accordingly (increasing awl.ip field width); 'fix' the t/data/spam/004 sample mail to avoid a test failing with a /24 net mask; avoid race condition in SQLBasedAddrList.pm when multiple processes try to insert-or-update an awl SQL record: try INSERT first, and if that fails go for UPDATE. Sending lib/Mail/SpamAssassin/AutoWhitelist.pm Sending lib/Mail/SpamAssassin/Plugin/AWL.pm Sending lib/Mail/SpamAssassin/SQLBasedAddrList.pm Sending sql/README.awl Sending sql/awl_mysql.sql Sending sql/awl_pg.sql Sending t/data/spam/004 Transmitting file data ....... Committed revision 883770. This is a rather hefty patch, although this is in large part due to swapping of 'insert' and 'update' code sections in SQLBasedAddrList.pm. I've been running this code for more than a month now at our server, seems to successfully avoid the race conditions of previous code. For 3.3.1 we might consider using ON DUPLICATE KEY UPDATE (as mentioned on the list by Michael Parker, topic: "Time for 3.3.0 beta?", and elsewhere), although I'm not sure how widely the feature is supported across SQL server types, so for now I'd just stick with INSERT first, and if that fails, do the UPDATE. Probably belongs to some other bug entry... -- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
