summaryrefslogtreecommitdiff
path: root/Assistant/Threads/TransferScanner.hs
Commit message (Collapse)AuthorAge
* add exporter thread to assistantGravatar Joey Hess2017-09-20
| | | | | | | | | | | | | | | | | | | | | | | This is similar to the pusher thread, but a separate thread because git pushes can be done in parallel with exports, and updating a big export should not prevent other git pushes going out in the meantime. The exportThread only runs at most every 30 seconds, since updating an export is more expensive than pushing. This may need to be tuned. Added a separate channel for export commits; the committer records a commit in that channel. Also, reconnectRemotes records a dummy commit, to make the exporter thread wake up and make sure all exports are up-to-date. So, connecting a drive with a directory special remote export will immediately update it, and getting online will automatically update S3 and WebDAV exports. The transfer queue is not involved in exports. Instead, failed exports are retried much like failed pushes. This commit was sponsored by Ewen McNeill.
* first pass at assistant knowing about export remotesGravatar Joey Hess2017-09-20
| | | | | | | | | | | | | | | Split exportRemotes out from syncDataRemotes; the parts of the assistant that upload keys and drop keys from remotes don't apply to exports, because those operations are not supported. Some parts of the assistant and webapp do operate on both syncDataRemotes and exportRemotes. Particularly when downloading from either of them. Added a downloadRemotes that combines both. With this, the assistant should download from exports, but it won't yet upload changes to them. This commit was sponsored by Fernando Jimenez on Patreon.
* AssociatedFile newtypeGravatar Joey Hess2017-03-10
| | | | | | To prevent any further mistakes like 1a497cefb47557f0b4788c606f9071be422b2511 This commit was sponsored by Francois Marier on Patreon.
* remove unused importGravatar Joey Hess2017-03-08
|
* assistant: Add 1/200th second delay between checking each file in the full ↵Gravatar Joey Hess2017-03-06
| | | | | | | | | | | | | | | | | | transfer scan, to avoid using too much CPU. The slowdown is not going to be large in typical small-ish repos. And it does not seem to matter if the assistant reacts a little bit slower in situations involving the expensive scan, since: a) Those situations typically involve getting back in sync after something has changed on a remote, often after a disconnect of some duration. So taking a few seconds more is not noticable. b) If the scan finds things that it needs to do, it will start blocking anyway after 10 transfers are queued (due to use of queueTransferWhenSmall). So, only the speed of finding the first 10 transfers will be impacted by this change. This commit was sponsored by Jochen Bartl on Patreon.
* remove xmpp supportGravatar Joey Hess2016-11-14
| | | | | | | | | | | | I've long considered the XMPP support in git-annex a wart. It's nice to remove it. (This also removes the NetMessager, which was only used for XMPP, and the daemonstatus's desynced list (likewise).) Existing XMPP remotes should be ignored by git-annex. This commit was sponsored by Brock Spratlen on Patreon.
* get, move, copy, mirror: Added --failed switch which retries failed copies/movesGravatar Joey Hess2016-08-03
| | | | | | | | | Note that get --from foo --failed will get things that a previous get --from bar tried and failed to get, etc. I considered making --failed only retry transfers from the same remote, but it was easier, and seems more useful, to not have the same remote requirement. Noisy due to some refactoring into Types/
* reorgGravatar Joey Hess2015-12-15
|
* add VerifiedCopy data typeGravatar Joey Hess2015-10-08
| | | | | | | | | There should be no behavior changes in this commit, it just adds a more expressive data type and adjusts code that had been passing around a [UUID] or sometimes a Maybe Remote to instead use [VerifiedCopy]. Although, since some functions were taking two different [UUID] lists, there's some potential for me to have gotten it horribly wrong.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* remove webUUID special caseGravatar Joey Hess2014-12-17
| | | | | | Now bittorrent is another special case like web. If the only remotes are web and bittorrent, it might as well scan those.
* replace (Key, Backend) with KeyGravatar Joey Hess2014-04-17
| | | | | | | | | | Only fsck and reinject and the test suite used the Backend, and they can look it up as needed from the Key. This simplifies the code and also speeds it up. There is a small behavior change here. Before, all commands would warn when acting on an annexed file with an unknown backend. Now, only fsck and reinject show that warning.
* avoid using function named that conflicts with name used in newer version of ↵Gravatar Joey Hess2014-01-29
| | | | process library
* fix transfers of key with no associated fileGravatar Joey Hess2014-01-23
| | | | | | | | | | | | | | | | | Several places assumed this would not happen, and when the AssociatedFile was Nothing, did nothing. As part of this, preferred content checks pass the Key around. Note that checkMatcher is sometimes now called with Just Key and Just File. It currently constructs a FileMatcher, ignoring the Key. However, if it constructed a FileKeyMatcher, which contained both, then it might be possible to speed up parts of Limit, which currently call the somewhat expensive lookupFileKey to get the Key. I have not made this optimisation yet, because I am not sure if the key is always the same. Will need some significant checking to satisfy myself that's the case..
* much better command action handling for sync --contentGravatar Joey Hess2014-01-20
|
* sync --content: New option that makes the content of annexed files be ↵Gravatar Joey Hess2014-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | transferred. Similar to the assistant, this honors any configured preferred content expressions. I am not entirely happpy with the implementation. It would be nicer if the seek function returned a list of actions which included the individual file gets and copies and drops, rather than the current list of calls to syncContent. This would allow getting rid of the somewhat reundant display of "sync file [ok|failed]" after the get/put display. But, do that, withFilesInGit would need to somehow be able to construct such a mixed action list. And it would be less efficient than the current implementation, which is able to reuse several values between eg get and drop. Note that currently this does not try to satisfy numcopies when getting/putting files (numcopies are of course checked when dropping files!) This makes it like the assistant, and unlike get --auto and copy --auto, which do duplicate files when numcopies is not yet satisfied. I don't know if this is the right decision; it only seemed to make sense to have this parallel the assistant as far as possible to start with, since I know the assistant works. This commit was sponsored by Øyvind Andersen Holm.
* hlintGravatar Joey Hess2013-10-02
|
* assistant: Clear the list of failed transfers when doing a full transfer ↵Gravatar Joey Hess2013-09-25
| | | | | | | | | | | | | | | | | scan. This prevents repeated retries to download files that are not available, or are not referenced by the current git tree. This is motivated by a user report that the assistant was repeatedly retrying transfers of files that had been deleted (in direct mode, so removing the only copy). Note that the glacier code retries failed transfers after a while to retry downloads that have aged long enough to be available. This is ok; if we're doing a full transfer scan we'll retry on every file that is still in the git tree. Also note that this makes the assistant less likely to get every file referenced by old revs of the git tree. Not something the assistant tries to ensure anyway, so I feel this is acceptable.
* assistant: On Linux, the expensive transfer scan is run niced.Gravatar Joey Hess2013-06-20
| | | | | | | This is a compromise. I would like to nice every thread except for the webapp thread, but it's not practical to do so. That would need every thread to run as a bound thread, which could add significant overhead. And any forkIO would escape the nice level.
* check for unused keys on an unwanted remote, and move them off, before ↵Gravatar Joey Hess2013-04-03
| | | | deleting it
* clean up urlrenderer handling when the webapp is not builtGravatar Joey Hess2013-04-03
|
* detect when unwanted remote is empty and remove itGravatar Joey Hess2013-04-03
| | | | Needs fixes to build when the webapp is disabled.
* move display of transfer scan in progress to transfers section of dashboardGravatar Joey Hess2013-03-19
| | | | | This way it's only visible when transfers are not running, which is about what a user would expect.
* new alert while scanningGravatar Joey Hess2013-03-18
| | | | | | | Like the old one, but does not mention which remotes are scanned. I think this is less confusing, as it does not imply the remotes were somehow accessed (which they are not; inaccessible remotes can be scanned.)
* webapp: Improved alerts displayed when syncing with remotes, and when ↵Gravatar Joey Hess2013-03-18
| | | | syncing with a remote fails.
* assistant: Sync with all git remotes on startup.Gravatar Joey Hess2013-03-08
|
* add additional debug info about reasons for dropsGravatar Joey Hess2013-03-01
|
* add additional debug info about reasons for transfersGravatar Joey Hess2013-03-01
|
* webapp: Now allows restarting any threads that crash.Gravatar Joey Hess2013-01-26
|
* --auto fixesGravatar Joey Hess2012-12-06
| | | | | | | * get/copy --auto: Transfer data even if it would exceed numcopies, when preferred content settings want it. * drop --auto: Fix dropping content when there are no preferred content settings.
* better function nameGravatar Joey Hess2012-12-01
|
* webapp and assistant glacier supportGravatar Joey Hess2012-11-24
|
* don't try to transfer data to/from XMPP remotesGravatar Joey Hess2012-11-11
| | | | | Partition syncRemotes into ones needing git sync (ie, non-special remotes), and ones needing data sync (ie, non-XMPP remotes).
* finished pushing Assistant monad into all relevant filesGravatar Joey Hess2012-10-30
| | | | All temporary and old functions are removed.
* cleanup daemonStatus accessorsGravatar Joey Hess2012-10-30
|
* split ScanRemotes and liftedGravatar Joey Hess2012-10-29
|
* lift alertWhileGravatar Joey Hess2012-10-29
|
* converted 6 more threadsGravatar Joey Hess2012-10-29
|
* Assistant monad, stage 2.5Gravatar Joey Hess2012-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.
* check and drop after uploadsGravatar Joey Hess2012-10-18
|
* check and drop unwanted content from remotes after receiving a transferGravatar Joey Hess2012-10-18
|
* splitGravatar Joey Hess2012-10-18
|
* drop unwanted content in the transfer scanGravatar Joey Hess2012-10-18
| | | | | | | | This was complicated quite a bit by needing to check numcopies. I optimised that, so it only looks up numcopies once per file, no matter how many remotes it checks to drop from. Although it did just occur to me that it might be better to first check if it wants to drop content, and only then check numcopies..
* minor transfer scanner code reworkingGravatar Joey Hess2012-10-18
| | | | Also a small optimisation using a Set
* better variable nameGravatar Joey Hess2012-10-14
|
* avoid queuing transfers for remotes after syncing to them is pausedGravatar Joey Hess2012-10-14
| | | | | | | | | | | | | This avoids the expensive transfer scan relying on its list of remotes to scan being accurate throughout, which it will not be when the user pauses syncing to a remote. I feel it's ok to queue transfers to *any* known remote, not just the ones being scanned. Note that there are still small races where after syncing to a remote is paused, a transfer can be queued for it. Not just in the expensive transfer scan, but in the cheap failed transfer scan, and elsewhere.
* use gitRepoGravatar Joey Hess2012-10-12
|
* assistant: Now honors preferred content settings when deciding what to transfer.Gravatar Joey Hess2012-10-09
| | | | | | | | | Both when queueing downloads, and uploads, consults the preferred content settings. I didn't make it check yet when requeing failed transfers or queuing deferred downloads; dealing with the preferred content settings (or indeed, other settings) changing while the assistant is running still needs work.
* fix last zombies in the assistantGravatar Joey Hess2012-10-04
| | | | | Made Git.LsFiles return cleanup actions, and everything waits on processes now, except of course for Seek.
* cleanupGravatar Joey Hess2012-09-17
|