git-annex/debian
Joey Hess e5b4d447b6 assistant: Start a new git-annex transferkeys process after a network connection change
So that remotes that use a persistent network connection are restarted.

A remote might keep open a long duration network connection, and could
fail to deal well with losing the connection. This is particularly a
concern now that we have external special reotes. An external
special remote that is implemented naively might open the connection only
when PREPARE is sent, and if it loses connection, throw errors on each
request that is made.

(Note that the ssh connection caching should not have this problem; if the
long-duration ssh process loses connection, the named pipe is disconnected
and the next ssh attempt will reconnect. Also, XMPP already deals with
disconnection robustly in its own way.)

There's no way for git-annex to know if a lost network connection actually
affects a given remote, which might have a transfer in process. It does not
make sense to force kill the transferkeys process every time the NetWatcher
detects a change. (Especially because the NetWatcher sometimes polls 1
change per hour.)

In any case, the NetWatcher only detects connection to a network, not
disconnection. So if a transfer is in progress over the network, and the
network goes down, that will need to time out on its own.

An alternate approch that was considered is to use a separate transferkeys
process for each remote, and detect when a request fails, and assume that
means that process is in a failing state and restart it. The problem with
that approach is that if a resource is not available and a remote fails
every time, it degrades to starting a new transferkeys process for every
file transfer, which is too expensive.

Instead, this commit only handles the network reconnection case, and restarts
transferkeys only once the network has reconnected and another transfer needs
to be made. So, a transferkeys process will be reused for 1 hour, or until the
next network connection.

----

The NotificationBroadcaster was rewritten to use TMVars rather than MSampleVars,
to allow checking without blocking if a notification has been received.

----

This commit was sponsored by Tobias Brunner.
2014-01-06 16:03:39 -04:00
..
tests Debian: Run the builtin test suite as an autopkgtest. 2013-08-15 15:49:19 +02:00
changelog assistant: Start a new git-annex transferkeys process after a network connection change 2014-01-06 16:03:39 -04:00
compat debhelper v9 2012-01-15 14:53:38 -04:00
control Add tasty to build-depends, so that test suite builds again. (tasty was stuck in incoming.) 2013-12-24 13:58:50 -04:00
copyright move all static site files out of subdirectories 2013-12-09 14:38:22 -04:00
doc-base Add doc-base file. Closes: #621408 2011-04-06 21:57:22 -04:00
menu fixups 2013-05-15 22:48:27 -04:00
NEWS prep release 2013-10-02 16:13:45 -04:00
rules re-enable test suite 2013-12-30 14:39:29 -04:00