git-annex/Database
Joey Hess 38a23928e9
temporarily remove cached keys database connection
The problem is that shutdown is not always called, particularly in the test
suite. So, a database connection would be opened, possibly some changes
queued, and then not shut down.

One way this can happen is when using Annex.eval or Annex.run with a new
state. A better fix might be to make both of them call Keys.shutdown
(and be sure to do it even if the annex action threw an error).

Complication: Sometimes they're run reusing an existing state, so shutting
down a database connection could cause problems for other users of that
same state. I think this would need a MVar holding the database handle,
so it could be emptied once shut down, and another user of the database
connection could then start up a new one if it got shut down. But, what if
2 threads were concurrently using the same database handle and one shut it
down while the other was writing to it? Urgh.

Might have to go that route eventually to get the database access to run
fast enough. For now, a quick fix to get the test suite happier, at the
expense of speed.
2015-12-16 14:05:26 -04:00
..
Keys add inode cache to the db 2015-12-09 17:00:37 -04:00
Fsck.hs associated files database 2015-12-07 14:35:37 -04:00
Handle.hs reorder database shutdown to be concurrency safe 2015-12-16 13:52:43 -04:00
Keys.hs temporarily remove cached keys database connection 2015-12-16 14:05:26 -04:00
Types.hs add inode cache to the db 2015-12-09 17:00:37 -04:00