-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework handling of exclusive db access * sqlite3 Python module provides an implicit transaction management functionality when isolation_level argument is not None when passed to a connect method; * sqlite3 itself by default operates in the autocommit mode which can be disabled by executing the "BEGIN" SQL command; https://www.sqlite.org/lockingv3.html#transaction_control * BEGIN without EXCLUSIVE does not obtain an exclusive lock for the database and the default behavior is to run a transaction as DEFERRED; https://www.sqlite.org/lang_transaction.html#immediate The desired behavior for the framework is holding an exclusive access to the DB while a Framework object exists and is not closed which requires maintaining exclusive access across transactions. This is possible to achieve by using `PRAGMA locking_mode=EXCLUSIVE`. With this change, it will not be possible to have two Framework objects with exclusive access to the backend storage.
- Loading branch information
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters