git-annex/Assistant/Types
Joey Hess 635c9a1549 assistant: Detect stale git lock files at startup time, and remove them.
Extends the index.lock handling to other git lock files. I surveyed
all lock files used by git, and found more than I expected. All are
handled the same in git; it leaves them open while doing the operation,
possibly writing the new file content to the lock file, and then closes
them when done.

The gc.pid file is excluded because it won't affect the normal operation
of the assistant, and waiting for a gc to finish on startup wouldn't be
good.

All threads except the webapp thread wait on the new startup sanity checker
thread to complete, so they won't try to do things with git that fail
due to stale lock files. The webapp thread mostly avoids doing that kind of
thing itself. A few configurators might fail on lock files, but only if the
user is explicitly trying to run them. The webapp needs to start
immediately when the user has opened it, even if there are stale lock
files.

Arranging for the threads to wait on the startup sanity checker was a bit
of a bear. Have to get all the NotificationHandles set up before the
startup sanity checker runs, or they won't see its signal. Perhaps
the NotificationBroadcaster is not the best interface to have used for
this. Oh well, it works.

This commit was sponsored by Michael Jakl
2013-10-05 17:04:21 -04:00
..
Alert.hs webapp: Better display of added files. 2013-07-10 15:37:40 -04:00
BranchChange.hs split BranchChange and lifted 2012-10-29 19:20:54 -04:00
Buddies.hs finished XMPP pairing! 2012-11-05 17:43:17 -04:00
Changes.hs fix bda237f14a 2013-04-24 17:50:11 -04:00
Commits.hs remove last use of TSet 2013-04-24 17:16:04 -04:00
DaemonStatus.hs assistant: Detect stale git lock files at startup time, and remove them. 2013-10-05 17:04:21 -04:00
NamedThread.hs assistant: Detect stale git lock files at startup time, and remove them. 2013-10-05 17:04:21 -04:00
NetMessager.hs fix minor memory leak caused by recent CanPush change 2013-05-22 15:47:06 -04:00
Pushes.hs refactor XMPP client 2012-11-03 14:16:17 -04:00
ScanRemotes.hs split cost out into its own module 2013-03-13 16:30:34 -04:00
ThreadedMonad.hs moved ThreadedMonad to Types 2012-10-29 19:07:10 -04:00
ThreadName.hs webapp: Now allows restarting any threads that crash. 2013-01-26 17:09:33 +11:00
TransferQueue.hs moved AssociatedFile definition 2013-07-04 02:36:02 -04:00
TransferrerPool.hs maintain pools of running transferkeys processes (untested) 2013-03-19 18:46:29 -04:00
TransferSlots.hs pushed Assistant monad down into DaemonStatus code 2012-10-30 15:39:15 -04:00
UrlRenderer.hs clean up urlrenderer handling when the webapp is not built 2013-04-03 17:48:54 -04:00