[0.18][#109169][merge] add lock debugging, remove unnecessary lock peeks

Robert Collins robertc at robertcollins.net
Wed Jul 4 10:36:28 BST 2007


On Wed, 2007-07-04 at 19:24 +1000, Martin Pool wrote:
> 
> > Why not create brokenrename transport and server within the test
> module?
> > Its testing code, and you even have a comment that you don't want it
> to
> > be required to pass the transport conformance tests.
> 
> Do you mean moving it to tests.transport.brokenrename or something?

I mean in the lock tests python file - you only need the Server
declaration and the TransportDecorator subclass.

> Actually I think it would/should pass the tests, but it is so trivial
> as to probably not be worth running through every test.  I  put it
> there because that's where vfat and similar things are.

Well, untested code is broken code :).

> > Why not just use delete_tree rather than trying, failing and trying
> > again? The smart server does delete_tree in a single round trip
> (even on
> > older versions) rather than many, and its possible webdav etc can do
> > that too in future.
> 
> Mostly because I didn't want to make things slower on sftp, and we
> should rarely need to do the delete_tree - only on servers with that
> rename behaviour and only when there was lock contention.  On the
> other hand just always doing the recursive deletion is simpler.

Right. And in fact we could have the sftp recursive delete try a regular
delete first and see if that worked.

> > I note that you still double-peek - why is that ?
> 
> Where?

after _attempt_lock it says 'sometimes we know that its held by someone
else but we peek anyway' or words to that effect. Perhaps a comment
saying that this is not a performance issue because XXX.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070704/7a2622aa/attachment.pgp 


More information about the bazaar mailing list