|
From: Dan F. <da...@ha...> - 2007-01-20 21:53:21
|
Lionel Bouton wrote: > Agreed. I'm leaving for holidays, but as soon as I have some time > (probably around january the 31th) I'll issue a 1.6.8 with a fix for > this one. > Ok sounds great. >> [ 1574884 ] db_clean_hostname and HOSTNAME ............. >> If I were you, I'd store the last cleanup timestamp in the database. >> >> Not a bad idea at all.. Except for the race condition you mention and having to change the db-schema, which you explicitly told me not to do ;) >> - it can only marginally slow down the database, not corrupt it in any way Yeah.. No corruption should be possible when multiple cleanups are made at the same time. But it does put heavy load on the sql and sqlgrey on our servers during cleanup, Also, AFAIK, sqlgrey is unresponsive during cleanup, a problem that gave me a lot of trouble while i was running postgrey. And using db_clustering just makes the "connect" table so much bigger.. For me, a cronjob would be great, since we are redesigning our mailcluster, so that there is a "master" controller box, and a lot of slaves (simplified). The controller will run SQL master and LVS clustering. The master will (no longer) run postfix and sqlgrey and so forth.. Here it would be great to have a cronjob doing the actual db-cleanup.. Ive seen some of you on this list actually use the db_cluster features. What would suit your needs? >> You could have race conditions where 2+ SQLgrey wants to update at the >> very same time. >> For problems like this, i usually do random(0-x) sleeping , before UPDATE'ing the timestamp.. It decreases the likelihood of a collision tremendously. Like this: SELECT. Determine if its time to do clean up.. If yes -> sleep random(0-x) UPDATE (blahblah) WHERE `timestamp`='<timestamp from SELECT>' If affected_rows > 0 then do_cleanup. "x" could be 4 seconds or so. I dont suppose, due to sqlgrey's multithreaded nature, that this will cause it to hang for the sleep time? > - SPF checking would be really cool :). Anyone who knows which spf-lib for perl is the "standard"? .... > Hum, you do what you want with 1.7.x, but I'm considering SPF as a dying horse begging for someone to put an end to its misery... I am SO hoping SPF will be more common (since it is, in theory, a great idea). And adding to sqlgrey, so SPF=whitelist, might help the adaptation. :) But if me (and the Dmitry122, who posted the idea), are the only ones who likes it, i really wont bother :) > Any DNS query > is a problem with SQLgrey as the process serializes Postfix requests. MX > checking would be interesting but you'll have to solve the serialization > problem. > I dont understand the "serialization problem"? (or maybe i dont understand the term). - Dan Faerch |