Hey, This is actually implimented in current dbmail in db_insert_message(), using status 5, not 4. The status is set to 0 (new message) when updated, so the filtering race condition Aaron was facing does exist, but the "messages entry inserted, no messageblks yet" race condition I mentioned here does not.
---- Original Message ---- From: Jesse Norell <[email protected]> To: [email protected] Subject: [Dbmail-dev] message status 4 Sent: Tue, 10 Jun 2003 09:07:06 -0600 (MDT) > > Hello, > > In implimenting a unique_id fix, in several issues in the past, and > in message insertion in general, it seems appropriate to have a > message status that basically just means 'not yet processed/complete,' > for which I propose using message status = 4 (which isn't used > anywhere, right?). I believe all the existing code should handle > that without change (ie. if status is 4, it won't show in any > mailboxes, get cleaned by maintenance, etc.), so there should be no > migration problems unless someone uses status 4 locally (which a > trivial db update can fix). > > This would make things like the "message inserted, but not yet > filtered" race condition Aaron was going to have to address a while > back easy - just insert all messages with status = 4, do whatever > processing, and update to 2 when the message is fully processed. > It would fix a race condition in the current insertion code where a > message actually changes unique_id and another where the messages > table entry exists, but messageblk entries do not yet (ie. if > messages entry was inserted, then a user checks POP3 before > messageblk is inserted, it'll hang OE waiting for data, till a > timeout period, then error). > > Sound good / any objections (particularly from IC&S)? > > Jesse > > > -- > Jesse Norell > jesse (at) kci.net > > > _______________________________________________ > Dbmail-dev mailing list > [email protected] > http://twister.fastxs.net/mailman/listinfo/dbmail-dev > -- End Original Message -- -- Jesse Norell jesse (at) kci.net
