I decided to do a bit of research. I use SQLite in a lot of products but never myself incorporated it into an application, so way too much time later...
There are all sorts of warnings against using SQLite on file shares. Apparently the issues involved are pretty OS specific, but this warning seems to summarize it (source
https://www.sqlite.org/lockingv3.html):
SQLite uses POSIX advisory locks to implement locking on Unix. On Windows it uses the LockFile(), LockFileEx(), and UnlockFile() system calls. SQLite assumes that these system calls all work as advertised. If that is not the case, then database corruption can result. One should note that POSIX advisory locking is known to be buggy or even unimplemented on many NFS implementations (including recent versions of Mac OS X) and that there are reports of locking problems for network filesystems under Windows. Your best defense is to not use SQLite for files on a network filesystem.
This actually gives me pause whether multi-threaded access from MM5 with my database on a file share might actually be a bad idea.
There are lengthy discussions there for how write ahead logging works, and implications. Also, that site has data from MANY years ago, so some things may have changed and not been updated (though the reference page is specific to version 3 locking which is current now).
I bring this up partly in case others see this topic, but also because I also saw a note about MMS:
MMS uses SQLite. There isn't any limit on # of connections, only what your HW allows. And yes, the DB is supposed to by modified concurrently by multiple connections.
(From
http://www.mediamonkey.com/forum/viewto ... 31&t=90816) and it is unclear whether in the MMS design the multiple connections are from remote clients to a server application, or remote clients to the database itself. I hope the former? And it won't do remote connections as file shares?
I decided to do a bit of research. I use SQLite in a lot of products but never myself incorporated it into an application, so way too much time later...
There are all sorts of warnings against using SQLite on file shares. Apparently the issues involved are pretty OS specific, but this warning seems to summarize it (source [url]https://www.sqlite.org/lockingv3.html[/url]):
[quote]SQLite uses POSIX advisory locks to implement locking on Unix. On Windows it uses the LockFile(), LockFileEx(), and UnlockFile() system calls. SQLite assumes that these system calls all work as advertised. If that is not the case, then database corruption can result. One should note that POSIX advisory locking is known to be buggy or even unimplemented on many NFS implementations (including recent versions of Mac OS X) and that there are reports of locking problems for network filesystems under Windows. Your best defense is to not use SQLite for files on a network filesystem.
[/quote]
This actually gives me pause whether multi-threaded access from MM5 with my database on a file share might actually be a bad idea.
There are lengthy discussions there for how write ahead logging works, and implications. Also, that site has data from MANY years ago, so some things may have changed and not been updated (though the reference page is specific to version 3 locking which is current now).
I bring this up partly in case others see this topic, but also because I also saw a note about MMS:
[quote]MMS uses SQLite. There isn't any limit on # of connections, only what your HW allows. And yes, the DB is supposed to by modified concurrently by multiple connections.[/quote]
(From [url]http://www.mediamonkey.com/forum/viewtopic.php?f=31&t=90816[/url]) and it is unclear whether in the MMS design the multiple connections are from remote clients to a server application, or remote clients to the database itself. I hope the former? And it won't do remote connections as file shares?