cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Commented] (CAY-1868) Select contention with multiple contexts
Date Wed, 25 Dec 2013 09:15:54 GMT


Andrus Adamchik commented on CAY-1868:

[~olegart] We discussed 2 patches  - one for 3.1 that does not involve changes to recalculation
of the values and simply provides "synchronize on change" approach to the relationship, and
one for 3.2 that gets rid of the need to recalculate the values, making this modeler responsibility.
The patch seems to be the mix of the 2 and still keeps synchronization around. 

> 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
> 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