> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Martin Phillips
> Sent: Friday, October 24, 2008 1:18 AM
> To: [email protected]
> Subject: Re: [U2] Triggers on a NFS file?
> 
> Hi George,
> 
> > If I have a NFS mounted directory (on a third non-UV system)
> > which houses a UV format file.
> >
> > I have (2) linux system that have that directory mounted, which
> > each have UV that have a VOC pointer to that file. <1>F ,
> > <2> /mnt/directory/filename ,
> > <3> /mnt/directory/D_filename
> >
> >  Both UV systems can read/write to this file, but only one system
> > will be writing to the file, the other will only be 
> reading.I realize
> > locking is not respected from one system to another.
> 
> Be careful! I have seen (and repaired) files that have been 
> damaged in 
> broadly similar situation.
> 
> As you say, the locking system will not work as the file is 
> being accessed 
> by two completely independent UV systems. The problem that 
> you may have is 
> not with record locking but with group locking that protects 
> the internal 
> structure of the file. Even with only one system writing, it 
> is possible 
> (likely?) that there will be times when the system doing the 
> reading will 
> access a group at the same moment that the other system is 
> modifying an 
> overflow chain.

We run into similar timing issues with trading partners when exchanging
data via ftp, although this doesn't involve UV hashed files.  The issue
is similar, though, in that one side needs to know for sure that the
other has finished writing before it begins reading to avoid data loss.
One way we handle this is by having the writing machine write a file
with the same name and a ".done" extension appended to the end when it
is done updating.  The writing machine will not attempt to do any
further writing to that file as long as the ".done" file exists.  The
reading machine will wait until it sees the ".done" file before it
begins reading, and will delete the ".done" file when it's finished.  I
think that might also work in this scenario.

-John
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to