summaryrefslogtreecommitdiff
path: root/Assistant/Threads
Commit message (Collapse)AuthorAge
* add two long-running XMPP push threads, no more inversion of controlGravatar Joey Hess2013-05-22
| | | | | | | | | I hope this will be easier to reason about, and less buggy. It was certianly easier to write! An immediate benefit is that with a traversable queue of push requests to select from, the threads can be a lot fairer about choosing which client to service next.
* per-client inboxes for push messagesGravatar Joey Hess2013-05-21
| | | | | | | | | | | This will avoid losing any messages received from 1 client when a push involving another client is running. Additionally, the handling of push initiation is improved, it's no longer allowed to run multiples of the same type of push to the same client. Still stalls sometimes :(
* XMPP: Be better at responding to CanPush messages when busy with something else.Gravatar Joey Hess2013-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Observed: With 2 xmpp clients, one would sometimes stop responding to CanPush messages. Often it was in the middle of a receive-pack of its own (or was waiting for a failed one to time out). Now these are always immediately responded to, which is fine; the point of CanPush is to find out if there's another client out there that's interested in our push. Also, in queueNetPushMessage, queue push initiation messages when we're already running the side of the push they would initiate. Before, these messages were sent into the netMessagesPush channel, which was wrong. The xmpp send-pack and receive-pack code discarded such messages. This still doesn't make XMPP push 100% robust. In testing, I am seeing it sometimes try to run two send-packs, or two receive-packs at once to the same client (probably because the client sent two requests). Also, I'm seeing rather a lot of cases where it stalls out until it runs into the 120 second timeout and cancels a push. And finally, there seems to be a bug in runPush. I have logs that show it running its setup action, but never its cleanup action. How is this possible given its use of E.bracket? Either some exception is finding its way through, or the action somehow stalls forever. When this happens, one of the 2 clients stops syncing.
* test suite passes in direct modeGravatar Joey Hess2013-05-17
| | | | | | | | | | | This fixes a bug with git annex add in direct mode. If some files already existed in the tree pointing at the same key as a file that was just added, and their content was not present, add neglected to copy the content to those files. I also changed the behavior of moveAnnex slightly: When content is moved into the annex in direct mode, it does not overwrite any content already present in direct mode files. That content may be modified after all.
* rename moduleGravatar Joey Hess2013-05-12
|
* --listen is not supported on AndroidGravatar Joey Hess2013-05-02
|
* avoid auto-accepting pair requests from friends already paired withGravatar Joey Hess2013-04-30
| | | | | | | Unless the request is for repo uuid we already know. This way, if A1 pairs with friend B1, and B1 pairs with device B2, then B1 can request A1 pair with it and no confirmation is needed. (In future, may want to try to do that automatically, to make a more robust network.)
* assistant: Fix bug that could cause incoming pushes to not get merged into ↵Gravatar Joey Hess2013-04-30
| | | | | | | | | | the local tree. Observed that the pushed refs were received, but not merged into master. The merger never saw an add event for these refs. Either git is not writing to a new file and renaming it into place, or the inotify code didn't notice that. Changed it to also watch for modify events and that seems to have fixed it!
* more xmpp debuggingGravatar Joey Hess2013-04-30
|
* Internet Archive!Gravatar Joey Hess2013-04-25
| | | | | | | * Add public repository group. * webapp: Can now set up Internet Archive repositories. TODO: Enabling IA repositories.
* use a DList for the deferred downloads queueGravatar Joey Hess2013-04-25
|
* committer tweak to wait for Watcher to resume after a max-size commitGravatar Joey Hess2013-04-25
| | | | | | Without this, a very large batch add has commits of sizes approx 5000, 2500, 1250, etc down to 10, and then starts over at 5000. This fixes it so it's 5000+ every time.
* optimise direct mode startup scanGravatar Joey Hess2013-04-24
| | | | | A recent change made existing symlinks be re-staged. That does not need to be done during the startup scan though.
* assistant: Sanitize XMPP presence information logged for debugging.Gravatar Joey Hess2013-04-24
|
* get rid of need to run pre-commit hook when assistant commits in direct modeGravatar Joey Hess2013-04-24
| | | | | | | | | | | That hook updates associated file bookkeeping info for direct mode. But, everything already called addAssociatedFile when adding/changing a file. It only needed to also call removeAssociatedFile when deleting a file, or a directory. This should make bulk adds faster, by some possibly significant amount. Bulk removals may be a little slower, since it has to use catKeyFile now on each removed file, but will still be faster than adds.
* refactoring and minor performance tweakGravatar Joey Hess2013-04-24
|
* remove last use of TSetGravatar Joey Hess2013-04-24
|
* batch commit every 5 thousand changes, not 10 thousandGravatar Joey Hess2013-04-24
| | | | | | | | | | | There's a tradeoff between making less frequent commits, and needing to use memory to store all the changes that are coming in. At 10 thousand, it needs 150 mb of memory. 5 thousand drops that down to 90 mb or so. This also turns out to have significant imact on total run time. I benchmarked 10k changes taking 27 minutes. But two 5k batches took only 21 minutes.
* convert PendingAddChange back to Change when an add failsGravatar Joey Hess2013-04-24
| | | | | | | If an add failed, we should lose the KeySource, since it, presumably, differs due to a change that was made to the file. (The locked down file is already deleted.)
* show one alert when bulk adding filesGravatar Joey Hess2013-04-24
| | | | | | | | | | | | Turns out that a lot of the time spent in a bulk add was just updating the add alert to rotate through each file that was added. Showing one alert makes for a significant speedup. Also, when the webapp is open, this makes it take quite a lot less cpu during bulk adds. Also, it lets the user know when a bulk add happened, which is sorta nice..
* assistant: when an add fails, requeue it for laterGravatar Joey Hess2013-04-23
| | | | See analysis in bug report for one way this could happen.
* rename moduleGravatar Joey Hess2013-04-23
|
* sync, assistant: Sync with remotes that have annex-ignore setGravatar Joey Hess2013-04-22
| | | | | | | | This is so git remotes on servers without git-annex installed can be used to keep clients' git repos in sync. This is a behavior change, but since annex-sync can be set to disable syncing with a remote, I think it's acceptable.
* fix warningGravatar Joey Hess2013-04-20
|
* assistant: Work around misfeature in git 1.8.2 that makes `git commit ↵Gravatar Joey Hess2013-04-18
| | | | | | --alow-empty -m ""` run an editor. See http://git-annex.branchable.com/bugs/assistant_hangs_during_commit/
* refactor static route definition -- android webapp build fixGravatar Joey Hess2013-04-17
| | | | | | Incidentially should work around the last problem that prevented the webapp building on Android. (Except for a few places I need to clean up after hand-fixing the spliced TH code.)
* remove debugGravatar Joey Hess2013-04-11
|
* addurl: Register transfer so the webapp can see it.Gravatar Joey Hess2013-04-11
| | | | | | * addurl: Register transfer so the webapp can see it. * addurl: Automatically retry downloads that fail, as long as some additional content was downloaded.
* assistant: Bug fix to avoid annexing the files that git uses to stand in for ↵Gravatar Joey Hess2013-04-10
| | | | | | symlinks on FAT and other filesystem not supporting symlinks. also, blog for the day..
* webapp: New --listen= option allows running the webapp on one computer and ↵Gravatar Joey Hess2013-04-08
| | | | | | | connecting to it from another. Does not yet use HTTPS. I'd need to generate a certificate, and I'm not sure what's the best way to do that.
* Bugfix: Direct mode no longer repeatedly checksums duplicated files.Gravatar Joey Hess2013-04-06
| | | | | | | | | | | | | | | | | Fixed by storing a list of cached inodes for a key, instead of just one. Backwards compatability note: An old git-annex version will fail to parse an inode cache file that has been written by a new version, and has multiple items. It will succees if just one. So old git-annexes will have even worse behavior when there are duplicated files, if that is possible. I don't think it will be a problem. (Famous last words.) Also, note that it doesn't expire old and unused inode caches for a key. It would be possible to add this if needed; just look through the associated files for a key and if there are more cached inodes, throw out any not corresponding to associated files. Unless a file is being copied repeatedly and the old copy deleted, this lack of expiry should not be a problem.
* Use lower case hash directories for storing files on crippled filesystems, ↵Gravatar Joey Hess2013-04-04
| | | | | | | | | | | | | | | same as is already done for bare repositories. * since this is a crippled filesystem anyway, git-annex doesn't use symlinks on it * so there's no reason to use the mixed case hash directories that we're stuck using to avoid breaking everyone's symlinks to the content * so we can do what is already done for all bare repos, and make non-bare repos on crippled filesystems use the all-lower case hash directories * which are, happily, all 3 letters long, so they cannot conflict with mixed case hash directories * so I was able to 100% fix this and even resuming `git annex add` in the test case will recover and it will all just work.
* refactor alert button creation codeGravatar Joey Hess2013-04-04
|
* 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.
* more efficient uuid to remote lookupGravatar Joey Hess2013-04-02
|
* convert "./file" from inotify to just "file"Gravatar Joey Hess2013-04-02
| | | | This just prettifies some display.
* Update working tree files fully atomicallyGravatar Joey Hess2013-04-02
| | | | | | | | | | | This avoids commit churn by the assistant when eg, replacing a file with a symlink. But, just as importantly, it prevents the working tree being left with a deleted file if git-annex, or perhaps the whole system, crashes at the wrong time. (It also probably avoids confusing displays in file managers.)
* optimise last commitGravatar Joey Hess2013-04-02
| | | | | Rather than re-adding a direct mode file unnecessarily when it's not changed, just re-stage the symlink.
* assistant: Fix bug that could cause direct mode files to be unstaged from git.Gravatar Joey Hess2013-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | My test case for this bug is to have the assistant running and syncing to a remote, and create a file in the annex. Then at the command line run git annex drop. The assistant sees that the file is gone, sees it's a wanted file, and downloads it from the remote. With a directory special remote and a small file, I was seeing around 1 time in 3, a race where the file got unstaged from git after it got downloaded. Looking at what direct mode content managing code does in this case, it deletes the symlink, and then adds the file content back. It would be possible, sometimes, to avoid removing the symlink and do this atomically. And I probably should.. but in some cases, particularly where the file needs to be run through `cp` (multiple direct mode files with same content), there's no way to atomically replace the symlink with the content. Anyway, the bug turns out to be something that the watcher does right for indirect mode, but not for direct mode. When it got an add event, it checked to see if this was a new file, or one we've already added. In the latter case, no add event was queued. But that means that only the rm event is queued, and so it unstages the file. Fixed by queueing an add event even when the file is already in git. Tested by running hundreds of drops in a loop; file remained staged.
* webapp: Added UI to delete repositories. Closes: #689847Gravatar Joey Hess2013-03-31
|
* assistant: Check small files into git directly.Gravatar Joey Hess2013-03-29
|
* New annex.largefiles setting, which configures which files `git annex add` ↵Gravatar Joey Hess2013-03-29
| | | | | | | | | | | | | and the assistant add to the annex. I would have sort of liked to put this in .gitattributes, but it seems it does not support multi-word attribute values. Also, making this a single config setting makes it easy to only parse the expression once. A natural next step would be to make the assistant `git add` files that are not annex.largefiles. OTOH, I don't think `git annex add` should `git add` such files, because git-annex command line tools are not in the business of wrapping git command line tools.
* avoid removing a transfer being made by another processGravatar Joey Hess2013-03-28
| | | | | When another process is running a transfer, if we try to run a dup it'll fail, and we should not remove the transfer from the transfer display.
* webapp: Fix a race that sometimes caused alerts or other notifications to be ↵Gravatar Joey Hess2013-03-27
| | | | | | | | | | | | | | | | | | | missed if they occurred while a page was loading. When a page is loaded, the javascript requests an notification url, and does long polling on the url to be informed of changes. But if a change occured before the notification url was requested, it would not be notified of that change, and so the page display would not update. I fixed this by *always* updating the page display after it gets the notification url. This is extra work, but the overhead is not noticable in the other overhead of loading a page. (A nicer way would be to somehow record the version of a page initially loaded, and then compare it with the current version when getting the notification url, and only force an update if it's changed. But getting the "version" of the different parts of the page that use long polling is difficult.)
* fix build with xmpp and w/o webappGravatar Joey Hess2013-03-24
|
* maintain pools of running transferkeys processes (untested)Gravatar Joey Hess2013-03-19
|
* 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.)