On 14 Aug 2018, at 3:09pm, Clemens Ladisch <clem...@ladisch.de> wrote:

> However, there are other file
> operations that are properly synchronized, e.g., it is not possible for two
> NFS clients to create a directory with the same name.

You are correct.  But there's still a problem with simulating a mutex system.

Suppose two computers try to create a remove folder with the same name at the 
same time.  The request which is processed first gets "completed successfully". 
 If everything is done correctly, the second request would get "folder with 
that name already exists".  But since the job has been done (a folder with that 
name does exist, so the task must have been completed, so the programmer should 
be happy) the second request is quite likely to get "completed successfully" 
too.  It takes a very fussy filesystem programmer to make their code report 
"the thing you asked for is complete as you requested, but I didn't do it".

Problems like this occur with many methods of trying to simulate locking using 
file system calls.  It would slow mundane file operations down too much to be 
as fussy as a mutex system needs to be.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to