[MERGE/RFC] no lock for 'is_shared'

John Arbash Meinel john at arbash-meinel.com
Fri Jul 25 13:42:32 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
| On Mon, 2008-07-21 at 17:27 -0500, John Arbash Meinel wrote:
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> One of the things I noticed when tracing update, is that we end up
|> reading the pack-names file twice. And I believe it is because
|> 'is_shared' takes out an implicit write lock, which we then throw away.
|>
|> And we use 'is_shared()' because BzrDir.find_repository() needs to know
|> whether it can use the containing repository or not. And it is done at
|> an early enough stage that we aren't going to have the repository
|> permanently locked yet. (It is done early enough that we don't even know
|> if we want a read lock or a write lock.)
|
| There is a bug here then: BzrDir.find_repository() should be using the
| smart server methods which can perform the test on the server for
| whether a repository can be used; we shouldn't be looking at is_shared
| from the client.
|
| -Rob

This is over a dumb transport, not over a smart one. Not much we can do
but probe.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiJyjgACgkQJdeBCYSNAAMvFACfSfrs2MraMeAvC3Iw6SxxB19l
ItoAn3BMvaasedPGU+DsJUEPuu8mrihm
=DP2S
-----END PGP SIGNATURE-----



More information about the bazaar mailing list