Updating /seen from concurrent sessions

Lawrence Greenfield leg+ at andrew.cmu.edu
Fri Nov 15 10:08:52 EST 2002


--On Friday, November 15, 2002 8:49 PM +1100 Andrew McNamara 
<andrewm at object-craft.com.au> wrote:

> I suspect there is a bug in the flat-file seen implementation. Each
> process opens the seen file and holds this file descriptor open. Then one
> process wants to update the file. It does this by writing a new file,
> and renaming it into place. But all the other processes still have the
> now unlinked and out of date copy open.

I'm still very dubious about this explanation. If you examine cyrusdb_flat, 
you'll see that "fetch()" calls "starttxn_or_refetch()", which either locks 
the file and makes sure we have the latest version or (if it's in a 
non-transactional read) makes sure it's reasonably up to date.

Larry





More information about the Info-cyrus mailing list