cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Closed] (CAY-1868) Select contention with multiple contexts
Date Sat, 28 Dec 2013 10:50:50 GMT


Andrus Adamchik closed CAY-1868.

    Resolution: Fixed

I just committed the latest patch to trunk and 3.1 branch. So now we've removed the contention
point, and will deal with dirty lazy initialization code in ObjRelationship some other day.
Thanks for the patch!

Postmortem notes:

1. You still left the "synchronized" keyword in the "refreshFromDeferredPath" method. I removed
it myself (see r1553803).
2. I suggest before submitting patches that you do "git svn rebase" your work branch against
the current state of the remote SVN branch. This way the patch can be applied cleanly by a
reviewer (at least for some time until SVN state diverges again). From the patch structure
it appears you haven't rebased for some time.

> Select contention with multiple contexts 
> -----------------------------------------
>                 Key: CAY-1868
>                 URL:
>             Project: Cayenne
>          Issue Type: Bug
>    Affects Versions: 3.1B2, 3.2M1
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.1B3, 3.2.M2
>         Attachments: cay1868.patch, cay1868v3_1.patch
> I am mostly using local cache and a single app-scoped ObjectContext for selects. So I
was oblivious to this issue. Today I tried shared cache and a pool of app-scoped ObjectContexts
randomly assigned to requests. I quickly hit a contention point:
>    java.lang.Thread.State: BLOCKED (on object monitor)
>         at
>         - waiting to lock <0x424bf840> (a
>         at
>         at
>         at
>         at org.apache.cayenne.access.DataDomainQueryAction.interceptRelationshipQuery(
> ObjRelationship recalculating its 'toMany' value on every call is evil by itself. Doing
parts of it in a synchronized block is completely unacceptable. 

This message was sent by Atlassian JIRA

View raw message