beets/docs/plugins
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
..
beetsweb.png screenshot image and syntax cleanup 2011-09-17 15:32:27 -07:00
bpd.rst BPD: print messages reflecting tree (re)build 2012-04-30 12:02:00 -07:00
chroma.rst chroma: "beet submit" command (#332) 2012-04-01 20:41:27 -07:00
embedart.rst translate plugin documentation 2011-09-17 11:04:51 -07:00
importfeeds.rst doc fixes 2012-04-10 12:11:23 -07:00
index.rst add featInTitle to "other plugins" list 2012-04-28 21:05:41 -07:00
inline.rst typo in inline plugin docs 2012-04-20 09:58:02 -07:00
lastgenre.rst docs for partial album matches (#260) 2011-12-01 14:26:30 -08:00
lyrics.rst "lyrics -p" prints out lyrics 2012-01-19 12:43:29 -08:00
mbcollection.rst add MusicBrainz collection plugin by @jeffayle 2012-03-23 11:34:57 -07:00
mpdupdate.rst inline plugin: define template fields in config (#169) 2011-12-27 14:43:58 -08:00
rdm.rst -n option for random command (#24) 2012-03-23 10:33:44 -07:00
replaygain.rst mention hangs in replaygain warning 2012-02-19 12:30:14 -08:00
rewrite.rst rewrite plugin 2012-01-16 20:48:23 -08:00
scrub.rst add "scrub" plugin (#280) 2012-01-02 14:03:28 -08:00
web.rst screenshot image and syntax cleanup 2011-09-17 15:32:27 -07:00
writing.rst transaction objects to control DB access 2012-05-06 23:24:05 -07:00