From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org
Subject: [JGIT PATCH 0/6] Add timeouts to network IO
Date: Fri, 19 Jun 2009 14:27:49 -0700 [thread overview]
Message-ID: <1245446875-31102-1-git-send-email-spearce@spearce.org> (raw)
If there's a bug in the remote peer software, or even just random
network hardware/cable failures between us and the remote peer, we
might block indefinitely waiting for more incoming data, or waiting
for TCP ACKs necessary to release space in our transmit buffer.
This series adds a timeout to everything, allowing the caller to
define some maximum waiting period before we abort and declare the
remote peer to be unresponsive. The default timeout of 0 will use
the traditional "block indefinitely" behavior we have always had.
Shawn O. Pearce (6):
Create input and output streams that have timeouts
Add remote.name.timeout to configure an IO timeout
Add timeouts to smart transport protocol clients
Add timeouts to smart transport protocol servers
Add timeouts to anonymous git:// daemon
Add --timeout command line options
.../src/org/spearce/jgit/pgm/Daemon.java | 5 +
.../src/org/spearce/jgit/pgm/Fetch.java | 5 +
.../src/org/spearce/jgit/pgm/LsRemote.java | 6 +
.../src/org/spearce/jgit/pgm/Push.java | 5 +
.../src/org/spearce/jgit/pgm/UploadPack.java | 6 +
.../spearce/jgit/transport/RemoteConfigTest.java | 26 ++
.../jgit/util/io/TimeoutInputStreamTest.java | 187 +++++++++++++
.../jgit/util/io/TimeoutOutputStreamTest.java | 286 ++++++++++++++++++++
.../spearce/jgit/transport/BasePackConnection.java | 36 +++-
.../jgit/transport/BasePackPushConnection.java | 29 ++-
.../src/org/spearce/jgit/transport/Daemon.java | 26 ++-
.../org/spearce/jgit/transport/DaemonClient.java | 12 +-
.../org/spearce/jgit/transport/ReceivePack.java | 57 ++++
.../org/spearce/jgit/transport/RemoteConfig.java | 31 +++
.../org/spearce/jgit/transport/SshTransport.java | 3 +-
.../src/org/spearce/jgit/transport/Transport.java | 21 ++
.../spearce/jgit/transport/TransportGitAnon.java | 13 +-
.../spearce/jgit/transport/TransportGitSsh.java | 103 +++++++-
.../org/spearce/jgit/transport/TransportLocal.java | 9 +-
.../org/spearce/jgit/transport/TransportSftp.java | 3 +-
.../src/org/spearce/jgit/transport/UploadPack.java | 59 ++++-
.../org/spearce/jgit/util/io/InterruptTimer.java | 216 +++++++++++++++
.../spearce/jgit/util/io/TimeoutInputStream.java | 133 +++++++++
.../spearce/jgit/util/io/TimeoutOutputStream.java | 146 ++++++++++
24 files changed, 1400 insertions(+), 23 deletions(-)
create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/util/io/TimeoutInputStreamTest.java
create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/util/io/TimeoutOutputStreamTest.java
create mode 100644 org.spearce.jgit/src/org/spearce/jgit/util/io/InterruptTimer.java
create mode 100644 org.spearce.jgit/src/org/spearce/jgit/util/io/TimeoutInputStream.java
create mode 100644 org.spearce.jgit/src/org/spearce/jgit/util/io/TimeoutOutputStream.java
next reply other threads:[~2009-06-19 21:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-19 21:27 Shawn O. Pearce [this message]
2009-06-19 21:27 ` [JGIT PATCH 1/6] Create input and output streams that have timeouts Shawn O. Pearce
2009-06-19 21:27 ` [JGIT PATCH 2/6] Add remote.name.timeout to configure an IO timeout Shawn O. Pearce
2009-06-19 21:27 ` [JGIT PATCH 3/6] Add timeouts to smart transport protocol clients Shawn O. Pearce
2009-06-19 21:27 ` [JGIT PATCH 4/6] Add timeouts to smart transport protocol servers Shawn O. Pearce
2009-06-19 21:27 ` [JGIT PATCH 5/6] Add timeouts to anonymous git:// daemon Shawn O. Pearce
2009-06-19 21:27 ` [JGIT PATCH 6/6] Add --timeout command line options Shawn O. Pearce
2009-06-20 22:28 ` [JGIT PATCH 2/6] Add remote.name.timeout to configure an IO timeout Robin Rosenberg
2009-06-20 22:54 ` Shawn O. Pearce
2009-06-22 21:09 ` [JGIT PATCH 1/6] Create input and output streams that have timeouts Robin Rosenberg
2009-06-23 16:41 ` [JGIT PATCH 1/6 v2] " Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1245446875-31102-1-git-send-email-spearce@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).