branch locking mk2.

John A Meinel john at arbash-meinel.com
Wed Feb 8 20:00:44 GMT 2006


Nir Soffer wrote:
> 
> On 8 Feb, 2006, at 3:25, Robert Collins wrote:
> 
>> On Wed, 2006-02-08 at 03:13 +0200, Nir Soffer wrote:
>>> Check MoinMoin/util/lock.py, which has similar but simpler design using
>>> only directories. Its about having one write lock or multiple read
>>> locks per resource.
>>
>> Well, we're not looking for read locks at all.
> 
> I'm not sure why you don't need those, so I explain how they work in moin:
> 
> ReadLock is required when you want to lock a resource that have many
> components that must be synced. While you update the resource, nobody
> can read it, because the components may be out of sync during an update.
> 
> In moin case, read locks are used for lupy search index. Many processes
> can read the same index in the same time, while only one process may
> update the index.
> 
> Isn't this required for bzr? many clients reading the same branch in the
> same time, only one can change it?
> 
> 
> Best Regards,
> 
> Nir Soffer

The issue is that with bzr we want to be able to pull from an http
server, so we have no chance to create anything on the server side.
Purely read-only.
Since we can't create a read lock, we need to design the rest of bzr so
that if we follow protocol, then reading is always safe.
The way we do it right now is that inventories are not written until all
of the text weaves have been updated, and then the revision info isn't
written until the inventory has finished. And then revision-history is
updated.
So if the client reads revision-history first, all revisions therein
should exist in the store. More *might* be there, but clients ignore that.
The same thing for texts. Each text weave might have some extra
information, but the client just ignores it, if it doesn't have the
revision information that goes with it.
(revision-id is effectively some sort of transaction number, and data
associated with unknown numbers is ignored.).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060208/cbdfa953/attachment.pgp 


More information about the bazaar mailing list