jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edgar Poce <edgarp...@gmail.com>
Subject Re: versioning questions
Date Tue, 21 Jun 2005 20:32:00 GMT
Hi tobi

>no, several (corresponding) nodes in different workspaces can have the
> same uuid (see Workspace.clone()). this is the basic idea of
> versioning and workspaces. this implies, that the root nodes of all
> workspaces must have the same uuid. the exception you describe is a
> bug. 
Thanks, it's clear now :)

> > A couple of doubts ... Since there are two separate instances of PMs
> > handling any versioning action, one for the workspace, and another for
> > the versioning, and versioning actions are not synchronized, how can
> > versioning be thread safe?, I mean that not necessarily the threads
> > will write to both PMs in the same order. And for the same reason (2
> > PMs for 1 action) it seems it won't be possible to persist versioning
> > changes as a unit in a single transaction. Comments?

Sorry I wasn't clear, I'm talking about low level PM scoped transactions 
In a single thread example: 
-- > checkin
----> versioning PM sucessfully creates versionhistory.
----> workspace PM fails to write changes.
result: inconsistent repo

> under thread-safe i understand, that 2 or more threads accessing an
> application do not corrupt the internal structure or crash the VM (eg.
> unsynchronized hashmap accesses, etc.)
so do I ;)

> the reasons, why we separated the versioning persistence, are:
> - the jcr:versionStore is shared by all workspaces, thus why should it
> be stored in default ws
> - the requirements for a versioning persistence is completely
> different from the rest of the repositories persistence (write once,
> read many)
Even if the the requirements are different, I think that versioning
should be handled in a single low level transaction in order to
guarantee acidity. With separated PMs changes might be committed
partially, the repository might turn inconsistent and in a
multithreaded environment users could see changes partially.
It seems I woke up paranoid today ;)


View raw message