summaryrefslogtreecommitdiff
path: root/Assistant/Threads/TransferScanner.hs
Commit message (Collapse)AuthorAge
* 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
|
* hlintGravatar Joey Hess2012-09-13
|
* display errors when any named thread crashesGravatar Joey Hess2012-09-06
|
* avoid some confusing alertsGravatar Joey Hess2012-08-26
|
* add support for readonly remotesGravatar Joey Hess2012-08-26
| | | | | | | Currently only the web special remote is readonly, but it'd be possible to also have readonly drives, or other remotes. These are handled in the assistant by only downloading from them, and never trying to upload to them.
* scan multiple remotes in one passGravatar Joey Hess2012-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | The expensive transfer scan now scans a whole set of remotes in one pass. So at startup, or when network comes up, it will run only once. Note that this can result in transfers from/to higher cost remotes being queued before other transfers of other content from/to lower cost remotes. Before, low cost remotes were scanned first and all their transfers came first. When multiple transfers are queued for a key, the lower cost ones are still queued first. However, this could result in transfers from slow remotes running for a long time while transfers of other data from faster remotes waits. I expect to make the transfer queue smarter about ordering and/or make it allow multiple transfers at a time, which should eliminate this annoyance. (Also, it was already possible to get into that situation, for example if the network was up, lots of transfers from slow remotes might be queued, and then a disk is mounted and its faster transfers have to wait.) Also note that this means I don't need to improve the code in Assistant.Sync that currently checks if any of the reconnected remotes have diverged, and if so, queues scans of all of them. That had been very innefficient, but now doesn't matter.
* keep track of which remotes have been scanned in process stateGravatar Joey Hess2012-08-24
| | | | | Since it turned out to make sense to always scan all remotes on startup, there's no need to persist the info about which have been scanned.