beets/beetsplug
Adrian Sampson a28f930c52 transaction objects to control DB access
In an attempt to finally address the longstanding SQLite locking issues, I'm
introducing a way to explicitly, lexically scope transactions. The Transaction
class is a context manager that always fully fetches after SELECTs and
automatically commits on exit. No direct access to the library is allowed, so
all changes will eventually be committed and all queries will be completed. This
will also provide a debugging mechanism to show where concurrent transactions
are beginning and ending.

To support composition (transaction reentrancy), an internal, per-Library stack
of transactions is maintained. Commits only happen when the outermost
transaction exits. This means that, while it's possible to introduce atomicity
bugs by invoking Library methods outside of a transaction, you can conveniently
call them *without* a currently-active transaction to get a single atomic
action.

Note that this "transaction stack" concepts assumes a single Library object per
thread. Because we need to duplicate Library objects for concurrent access due
to sqlite3 limitation already, this is fine for now. Later, the interface should
provide one transaction stack per thread for shared Library objects.
2012-05-06 23:24:05 -07:00
..
bpd transaction objects to control DB access 2012-05-06 23:24:05 -07:00
lastgenre transaction objects to control DB access 2012-05-06 23:24:05 -07:00
web transaction objects to control DB access 2012-05-06 23:24:05 -07:00
__init__.py make sure beetsplug is loaded as a namespace package 2010-07-20 23:15:19 -07:00
bench.py memoize %aunique results (share among tracks) 2012-04-29 18:07:29 -07:00
chroma.py fix crash on 0 chroma matches for singleton 2012-05-06 21:19:13 -07:00
embedart.py fix plugin hook in embedart 2011-12-28 15:56:07 -08:00
importfeeds.py change m3u open mode to 'a' so file content is not reseted at each import when in 'm3u' mode 2012-05-02 21:51:37 +02:00
info.py add "album art" to info plugin 2011-05-01 13:33:40 -07:00
inline.py fix plugin errors with missing sections 2012-01-31 18:52:27 -08:00
lyrics.py transaction objects to control DB access 2012-05-06 23:24:05 -07:00
mbcollection.py add MusicBrainz collection plugin by @jeffayle 2012-03-23 11:34:57 -07:00
mpdupdate.py transaction objects to control DB access 2012-05-06 23:24:05 -07:00
rdm.py flexible -f templates for album listings (and rdm) 2012-04-30 22:59:17 -07:00
replaygain.py lastgenre now writes tags to files (#279) 2011-12-20 17:49:11 -08:00
rewrite.py fix plugin errors with missing sections 2012-01-31 18:52:27 -08:00
scrub.py add "scrub" plugin (#280) 2012-01-02 14:03:28 -08:00