summaryrefslogtreecommitdiff
path: root/Assistant/Threads/TransferScanner.hs
Commit message (Collapse)AuthorAge
* 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.
* avoid crash when directory doesn't existGravatar Joey Hess2012-08-24
|
* run full transfer scan on all remotes at startupGravatar Joey Hess2012-08-24
| | | | Or when a remote first becomes available after startup.
* avoid requeueing a download from a remote that no longer has a keyGravatar Joey Hess2012-08-24
|
* don't rely on hasKeyCheap in the transfer scanGravatar Joey Hess2012-08-23
| | | | | | | The problem with using it here is that, if a removable drive is scanned and gets disconnected during the scan, testing for all the files will indicate it doesn't have them, and the scan is logged as completed successfully, without necessary transfers being queued.
* keep logs of failed transfers, and requeue them when doing a non-full scanGravatar Joey Hess2012-08-23
| | | | of a remote
* add transfer scanned flag filesGravatar Joey Hess2012-08-23
|
* make old activiy alerts stay visibleGravatar Joey Hess2012-07-30
| | | | | | They're updated to show whether the activity succeeded or failed. This adds several TODOs to the code to fix later.
* moved all alert messages into one fileGravatar Joey Hess2012-07-29
| | | | Makes it easier to edit for consistent voice etc.
* add some alertsGravatar Joey Hess2012-07-29
|
* send notifications when the TransferQueue is changedGravatar Joey Hess2012-07-28
| | | | | | The fun part was making it move things from TransferQueue to currentTransfers entirely atomically. Which will avoid inconsistent display if the WebApp renders the current status at just the wrong time. STM to the rescue!