As I understand, the accepted conventional wisdom on working with file shares and ArcGIS Server is that opportunistic locking should be disabled to workaround potential issues that can arise. This is highlighted in the ArcGIS Server Common Problems and Solutions guide.
Historically, the only way to disable opportunistic locks on a Windows machine was to disable the use of SMB2/3 to force the use of now-deprecated SMB1 protocol where opportunistic locking could be disabled via the registry. However these days SMB2/3 share can be configured using PowerShell via Set-SmbShare with the -LeasingMode parameter which gives us some additional options to continue working with current versions of SMB2/3, documented by Microsoft as:
-LeasingMode
Allow admins to stop leases and oplocks.
- Full = default SMB3
- Shared = grant read-caching lease but not write or handle-caching
- None = no oplocks or leases, like modified SMB1/3
Notably, setting -LeasingMode to None provides a mechanism to disable opportunistic locking without having to revert back to a deprecated version of the SMB protocol. However this also introduces an additional level of granularity with the shared leasing mode, where read caching is enabled but write and handle caching is disabled.
Given that any number of clients can share a read lease concurrently and there's an obvious potential benefit for file share performance in allowing caching on read-only access - is a shared LeasingMode an acceptable configuration from an ArcGIS perspective, or is it recommended that oplocks and leases should be disabled completely?