git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [JGIT PATCH 0/6] Add timeouts to network IO
@ 2009-06-19 21:27 Shawn O. Pearce
  2009-06-19 21:27 ` [JGIT PATCH 1/6] Create input and output streams that have timeouts Shawn O. Pearce
  0 siblings, 1 reply; 11+ messages in thread
From: Shawn O. Pearce @ 2009-06-19 21:27 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-06-23 16:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-19 21:27 [JGIT PATCH 0/6] Add timeouts to network IO Shawn O. Pearce
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

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).