Hang at commit time when using sftp or bzr+ssh

Stephen Auyeung stephen at ck12.org
Fri Dec 9 00:23:17 UTC 2011


Another possibility is caching at the higher level. For example, caching the master_branch at Branch. I see the code there, but the cache is being cleared when unlock is called and that makes the cache not very useful. Could it be that only some of the cache need to be clear but not all?

Thanks,
Stephen

-----Original Message-----
From: bazaar-bounces at lists.canonical.com [mailto:bazaar-bounces at lists.canonical.com] On Behalf Of Martin Packman
Sent: Thursday, December 08, 2011 3:49 PM
To: Aaron Bentley
Cc: bazaar at lists.canonical.com
Subject: Re: Hang at commit time when using sftp or bzr+ssh

On 08/12/2011, Aaron Bentley <aaron at aaronbentley.com> wrote:
>
> Any time you're thinking about scopes and destructors, it's worth 
> considering using a ContextManager.  The transport itself could 
> implement __exit__()

Half the time it seems thinking about context manager means your code is already going down the wrong route.

In this case, it takes the problem of "doing this results in 9 ssh connections that then hang around for a bit" and turns it into "doing this seems to work but is massively slow because it's repeatedly creating one ssh connection after another".

What seems to be needed instead of prompt cleanup is proper transport reuse.

Martin





More information about the bazaar mailing list