[Mulgara-dev] Size of server1 directory
Paul Gearon
gearon at ieee.org
Tue Jul 31 18:12:57 UTC 2007
On 7/31/07, Life is hard, and then you die <ronald at innovation.ch> wrote:
> Oh, warning to everybody: I just discovered a serious problem with the
> transactions a couple days ago - if you run two transactions in
> parallel (separate sessions), the second one will steal the write
> lock, messing things up. I'm still working on getting some tests
> working and hence why I haven't checked in the fix yet, but in the
> mean time the fix is simple:
>
> ------------------------------------------------------------------
> Index: jar/resolver/java/org/mulgara/resolver/MulgaraTransactionManager.java
> ===================================================================
> --- jar/resolver/java/org/mulgara/resolver/MulgaraTransactionManager.java (revision 325)
> +++ jar/resolver/java/org/mulgara/resolver/MulgaraTransactionManager.java (working copy)
> @@ -167,7 +167,7 @@
> */
> private MulgaraTransaction obtainWriteLock(DatabaseSession session)
> throws MulgaraTransactionException {
> - while (currentWritingSession != null && !writeLockReserved()) {
> + while (currentWritingSession != null || !writeLockReserved()) {
> try {
> writeLockCondition.await();
> } catch (InterruptedException ei) {
> ------------------------------------------------------------------
I'll defer to whatever Andrae has to say, but I thought we weren't
supposed to allow multiple transactions in parallel? Still, this
change certainly looks safer.
(Yes, we need a transaction logger as a front end, so we can have
multiple writers. Either that or institute tree merging on phases)
Paul
More information about the Mulgara-dev
mailing list