Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | Switch to MonadCatchIO-transformers for better handling of state while ↵ | Joey Hess | 2013-05-19 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | catching exceptions. As seen in this bug report, the lifted exception handling using the StateT monad throws away state changes when an action throws an exception. http://git-annex.branchable.com/bugs/git_annex_fork_bombs_on_gpg_file/ .. Which can result in cached values being redundantly calculated, or other possibly worse bugs when the annex state gets out of sync with reality. This switches from a StateT AnnexState to a ReaderT (MVar AnnexState). All changes to the state go via the MVar. So when an Annex action is running inside an exception handler, and it makes some changes, they immediately go into affect in the MVar. If it then throws an exception (or even crashes its thread!), the state changes are still in effect. The MonadCatchIO-transformers change is actually only incidental. I could have kept on using lifted-base for the exception handling. However, I'd have needed to write a new instance of MonadBaseControl for the new monad.. and I didn't write the old instance.. I begged Bas and he kindly sent it to me. Happily, MonadCatchIO-transformers is able to derive a MonadCatchIO instance for my monad. This is a deep level change. It passes the test suite! What could it break? Well.. The most likely breakage would be to code that runs an Annex action in an exception handler, and *wants* state changes to be thrown away. Perhaps the state changes leaves the state inconsistent, or wrong. Since there are relatively few places in git-annex that catch exceptions in the Annex monad, and the AnnexState is generally just used to cache calculated data, this is unlikely to be a problem. Oh yeah, this change also makes Assistant.Types.ThreadedMonad a bit redundant. It's now entirely possible to run concurrent Annex actions in different threads, all sharing access to the same state! The ThreadedMonad just adds some extra work on top of that, with its own MVar, and avoids such actions possibly stepping on one-another's toes. I have not gotten rid of it, but might try that later. Being able to run concurrent Annex actions would simplify parts of the Assistant code. | ||
* | use TList for ChangePool | Joey Hess | 2013-04-24 |
| | |||
* | turn on PackageImports globally | Joey Hess | 2013-04-13 |
| | | | | | | | This will make it easier to use the Evil Splicer, when it needs to add package qualified imports And there's no real downside. | ||
* | maintain pools of running transferkeys processes (untested) | Joey Hess | 2013-03-19 |
| | |||
* | make liftAnnex and liftAssistant polymorphic, like liftIO | Joey Hess | 2013-03-16 |
| | |||
* | webapp: Now allows restarting any threads that crash. | Joey Hess | 2013-01-26 |
| | |||
* | use async to track and manage threads | Joey Hess | 2013-01-26 |
| | |||
* | rename | Joey Hess | 2012-11-08 |
| | |||
* | better handling of lifting from XMPP -> Assistant | Joey Hess | 2012-11-05 |
| | |||
* | refactor XMPP client | Joey Hess | 2012-11-03 |
| | |||
* | xmpp buddy list tracking | Joey Hess | 2012-11-02 |
| | |||
* | finished pushing Assistant monad into all relevant files | Joey Hess | 2012-10-30 |
| | | | | All temporary and old functions are removed. | ||
* | pushed Assistant monad down into DaemonStatus code | Joey Hess | 2012-10-30 |
| | | | | | | Currently have three old versions of functions that more reworking is needed to remove: getDaemonStatusOld, modifyDaemonStatusOld_, and modifyDaemonStatusOld | ||
* | split remaining assistant types | Joey Hess | 2012-10-30 |
| | |||
* | split out daemonstatus types | Joey Hess | 2012-10-30 |
| | |||
* | split Commits and lifted | Joey Hess | 2012-10-29 |
| | |||
* | split Changes and lifted | Joey Hess | 2012-10-29 |
| | |||
* | split BranchChange and lifted | Joey Hess | 2012-10-29 |
| | |||
* | split ScanRemotes and lifted | Joey Hess | 2012-10-29 |
| | |||
* | moved ThreadedMonad to Types | Joey Hess | 2012-10-29 |
| | |||
* | split and lift Assistant.Pushes | Joey Hess | 2012-10-29 |
| | |||
* | tweak | Joey Hess | 2012-10-29 |
| | |||
* | Assistant monad, stage 2.5 | Joey Hess | 2012-10-29 |
| | | | | | | | | | | Converted several threads to run in the monad. Added a lot of useful combinators for working with the monad. Now the monad includes the name of the thread. Some debugging messages are disabled pending converting other threads. | ||
* | Assistant monad, stage 1 | Joey Hess | 2012-10-29 |
This adds the Assistant monad, and an AssistantData structure. So far, none of the assistant's threads run in the monad yet. |