Sonarr/Sonarr — pull request #147 by kayone (2014-11-24 21:49:07+00:00)
Title: Updated transaction locks to be defered.

This adds `IsolationLevel` as a parameter when starting a transaction, by default SQLite tries to obtain a very restrictive write lock (`IsolationLevel.Serializable`). this change switchies most of our locks to more friendly `IsolationLevel.ReadCommitted` isolation level.

##### READ COMMITTED
Specifies that shared locks are held while the data is being read to avoid dirty reads, but the data can be changed before the end of the transaction, resulting in nonrepeatable reads or phantom data. This option is the SQL Server default.

##### SERIALIZABLE
Places a range lock on the data set, preventing other users from updating or inserting rows into the data set until the transaction is complete. This is the most restrictive of the four isolation levels. Because concurrency is lower, use this option only when necessary. This option has the same effect as setting HOLDLOCK on all tables in all SELECT statements in a transaction.