I recently found a discussion in the Microsoft forums about the behaviour 
of SMB 2. I has become clear that the metadata ( directory listing) on 
network shares can be outdated for max 10 seconds. (new files are not seen, 
deleted files are still visible).

As the AUTO_SERVER option of H2 relies on the existance, the content and 
the non-existance of the  .lock.db file, this SMB 2 behaviour can cause 
problems ( clients think the db is free while it is not).


https://social.technet.microsoft.com/Forums/windows/en-US/a59feca6-8543-40a7-8d63-23b6c08beb64/caching-changes-in-smb3?forum=w8itpronetworking

*In SMB 2, there was the potential for the metadata cache to be 
inconsistent for a short while, since it was kept for 10 seconds (by 
default), without any mechanism to check if the cached data had changed on 
the server. The article you mentioned showed how to disable these metadata 
caches in SMB 2 to avoid those effects.*


*SMB 3 (Windows Server 2012 and Windows 8) introduced the concept of 
Directory Leasing, which makes the metadata cache for SMB a coherent cache. 
That means that the client metadata cache will be automatically invalidated 
on the client if there is a change on the server (someone else deleted a 
file or created a new file).*


*On the blog post above, you might want to look for the link to the SNIA 
Tutorial on SMB 3, delivered during the SNW Fall 2012 conference. It 
includes more details on Directory Leasing.*



The problem may be fixed with SMB 3, however according to the next post 
there are still a lot of configurations witch use SMB 2.

https://blogs.technet.microsoft.com/josebda/2013/10/02/windows-server-2012-r2-which-version-of-the-smb-protocol-smb-1-0-smb-2-0-smb-2-1-smb-3-0-or-smb-3-02-are-you-using/




 A simple solution could be: do no longer delete the .lock.db file.


-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to