[darcs-devel] [patch1383] made connection caching in Darcs.Repository.Ssh thread...

Ben Franksen bugs at darcs.net
Sun Jun 28 18:09:28 UTC 2015


New submission from Ben Franksen <benjamin.franksen at helmholtz-berlin.de>:

This came up when I tested my latest changes to D.R.Packs: I wondered why
this is so extremely slow when I cloned a remote repo over ssh from my home
machine. Then I added --debug and saw that re-using the connection failed
each time.

1 patch for repository http://darcs.net/screened:

patch f4d8302036b82a26296f5201cc6959c836909595
Author: Ben Franksen <benjamin.franksen at helmholtz-berlin.de>
Date:   Sun Jun 28 03:53:30 CEST 2015
  * made connection caching in Darcs.Repository.Ssh thread safe
  
  The module in question had a global variable implemented as an IORef which
  does not play well with concurrent threads. The revised implementation uses
  MVars and also takes care that a connection is only used by one thread at a
  time. This fixes severe performance problems and intermittent failures when
  cloning repos over ssh due to concurrent access from D.R.Packs.
  
  Another problem was that the connections were identified by the user at host
  part only, but not by the directory of the repo. This causes problems when
  e.g. pulling from multiple ssh repos on the same user at host. We now use a
  (user at host, repodir) pair as the key for cached connections.

----------
files: made-connection-caching-in-darcs_repository_ssh-thread-safe.dpatch, patch-preview.txt, unnamed
messages: 18635
nosy: bf
status: needs-screening
title: made connection caching in Darcs.Repository.Ssh thread...

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1383>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-preview.txt
Type: text/x-darcs-patch
Size: 10143 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20150628/7e3d46c7/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: made-connection-caching-in-darcs_repository_ssh-thread-safe.dpatch
Type: application/x-darcs-patch
Size: 23990 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20150628/7e3d46c7/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20150628/7e3d46c7/attachment-0001.obj>


More information about the darcs-devel mailing list