[Gluster-devel] Client side afr, locking, race condition, simultanous writes, out of sync

Martin Fick mogulguy at yahoo.com
Wed May 7 18:06:40 UTC 2008


> --- Brandon Lamb <brandonlamb at gmail.com> wrote:
> So a simple 2 server, 2 client, client side afr
> setup.
>
> The clients at the SAME time do:
>
> client1 # echo "one" > file.txt
> client2 # echo "two" > file.txt

--- gordan at bobich.net wrote:
> I think the parent directory version getting 
> bumped up on every create/delete operation 
> (this would probably require directory locking!) 
> inside it and using this parent directory version 
> number at create time of files inside it as the
> major version number, with the file's own version 
> number as the minor version number would solve 
> this, too.

Perhaps I am missing something, but I fail to see 
how this could help at all in this situation. Could
you extrapolate or give more details about how you
are picturing version #s helping out with this 
problem.  Here is how I picture version #s is this
scenario.

  SubA                  SubB

  /dir/file             /dir/file
  v2   v1               v2   v1

  client1 # echo "one" > file
  client2 # echo "two" > file

  /dir/file < one       /dir/file < two
  v2   v2               v2   v2

  /dir/file < two       /dir/file < one
  v2   v3               v2   v3

Now both subvolumes have the same version #s
but different file contents.  Where/how are 
you suggesting a fix to this situation?

-Martin



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ





More information about the Gluster-devel mailing list