openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2449) refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock
Date Tue, 05 Nov 2013 23:26:17 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814396#comment-13814396
] 

ASF subversion and git services commented on OPENJPA-2449:
----------------------------------------------------------

Commit 1539193 from [~jpaheath] in branch 'openjpa/branches/2.2.1.x'
[ https://svn.apache.org/r1539193 ]

OPENJPA-2449: refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to
2.2.1.x Albert Lee's patch.

> 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
>            Assignee: Heath Thomann
>            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