openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OPENJPA-2449) refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock
Date Tue, 05 Nov 2013 18:33:18 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-2449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Albert Lee updated OPENJPA-2449:
--------------------------------

    Patch Info: Patch Available

> refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock
> --------------------------------------------------------------
>
>                 Key: OPENJPA-2449
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2449
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jdbc, kernel
>    Affects Versions: 2.1.2, 2.2.1.1, 2.2.3, 2.3.1, 2.4.0
>            Reporter: Albert Lee
>            Priority: Minor
>         Attachments: OPENJPA-2449.patch
>
>
> Simple refresh(PESSIMISTIC_WRITE) generates multiple SQL statements. E.g.
>     em.refresh(t1, LockModeType.PESSIMISTIC_WRITE);
>     //SELECT t0.CMLT_FOLDER_CONTEXT_UPDATE_TMS, t0.CRE_TIME FROM T1 t0 WHERE t0.c1 =
?  [params=(String) c1]
>     //SELECT t0.c1 FROM T1 t0 WHERE t0.c1 = ?  FOR READ ONLY WITH RR USE AND KEEP UPDATE
LOCKS [params=(String) c1]
> It would be nice if a single SQL is executed to optimize SQL execution and chances that
another thread may compete to lock the same row.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message