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

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


Ben Franksen <benjamin.franksen at helmholtz-berlin.de> added the comment:

Following up with a small re-factoring that depends on the fix.

2 patches 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.

patch 09283ac15a43a4f182726a583a8901fc474f48b9
Author: Ben Franksen <benjamin.franksen at helmholtz-berlin.de>
Date:   Sun Jun 28 03:44:43 CEST 2015
  * use transferModeHeader from D.R.Ssh in D.U.C.TransferMode

----------
title: made connection caching in Darcs.Repository.Ssh thread... -> made connection caching in Darcs.Repository.Ssh threadsafe

__________________________________
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: 25213 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20150628/4fa317e6/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: 39060 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20150628/4fa317e6/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/4fa317e6/attachment-0001.obj>


More information about the darcs-devel mailing list