Koozali.org: home of the SME Server

Help ibays

Offline mattnee2013

  • 1
  • +0/-0
Help ibays
« on: April 22, 2013, 05:50:22 AM »
Sorry if this has been asked before but I have been searching for awhile now. I am working with ibays and am currently having a problem. If multiple users log on and open the same file the last one to click save overwrites all other changes. shouldn't oplocks prevent this from happening?

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Help ibays
« Reply #1 on: April 22, 2013, 08:28:41 PM »
Sorry if this has been asked before but I have been searching for awhile now. I am working with ibays and am currently having a problem. If multiple users log on and open the same file the last one to click save overwrites all other changes. shouldn't oplocks prevent this from happening?

No. 'oplocks' just gives a performance improvement (if applications are well behaved).

It sounds like you want exclusive locks - where only one user can have the file open at a time. It is up to the application to use those locks. If the application doesn't take an exclusive lock of the file, then the server can't solve that problem. The last one to write the file will be "the winner" as you have discovered.

https://en.wikipedia.org/wiki/File_locking#In_Microsoft_Windows
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html
http://oreilly.com/openbook/samba/book/ch05_05.html