You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Albert Lee (JIRA)" <ji...@apache.org> on 2011/02/17 22:02:12 UTC

[jira] Created: (OPENJPA-1943) Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme

Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme
--------------------------------------------------------------------------------------------------------------------------------

                 Key: OPENJPA-1943
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1943
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa, kernel
    Affects Versions: 2.0.1, 2.1.0, 2.2.0
            Reporter: Albert Lee
            Assignee: Albert Lee
             Fix For: 2.1.1, 2.2.0


Query timeout and lock timeout values are stored in fetch plan/configuration. Due to semantic difference between the Query and em API, separate fetch plan/configuration objects are attached to QueryImpl and EntityManagerImpl. 

When pessimistic lock is enforced by the provider to a query, if the underlying data base requires to generate multiple SQL statements, the timeout value from the QueryImpl is used to execute the data portion of the SQL statements but the timeout value from the EntityManagerImpl is used to issue the "FOR UPDATE" lock to the related table. This caused the discrepancy that the query timeout is NOT being honored. As a result, some database may wait forever and caused a "hung" scenario even the query timeout value is set. 
    



-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (OPENJPA-1943) Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee closed OPENJPA-1943.
-------------------------------


> Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1943
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1943
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa, kernel
>    Affects Versions: 2.0.1, 2.1.0, 2.2.0
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>             Fix For: 2.1.1, 2.2.0
>
>         Attachments: OPENJPA-1943.patch
>
>
> Query timeout and lock timeout values are stored in fetch plan/configuration. Due to semantic difference between the Query and em API, separate fetch plan/configuration objects are attached to QueryImpl and EntityManagerImpl. 
> When pessimistic lock is enforced by the provider to a query, if the underlying data base requires to generate multiple SQL statements, the timeout value from the QueryImpl is used to execute the data portion of the SQL statements but the timeout value from the EntityManagerImpl is used to issue the "FOR UPDATE" lock to the related table. This caused the discrepancy that the query timeout is NOT being honored. As a result, some database may wait forever and caused a "hung" scenario even the query timeout value is set. 
>     

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1943) Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee updated OPENJPA-1943:
--------------------------------

    Attachment: OPENJPA-1943.patch

> Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1943
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1943
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa, kernel
>    Affects Versions: 2.0.1, 2.1.0, 2.2.0
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>             Fix For: 2.1.1, 2.2.0
>
>         Attachments: OPENJPA-1943.patch
>
>
> Query timeout and lock timeout values are stored in fetch plan/configuration. Due to semantic difference between the Query and em API, separate fetch plan/configuration objects are attached to QueryImpl and EntityManagerImpl. 
> When pessimistic lock is enforced by the provider to a query, if the underlying data base requires to generate multiple SQL statements, the timeout value from the QueryImpl is used to execute the data portion of the SQL statements but the timeout value from the EntityManagerImpl is used to issue the "FOR UPDATE" lock to the related table. This caused the discrepancy that the query timeout is NOT being honored. As a result, some database may wait forever and caused a "hung" scenario even the query timeout value is set. 
>     

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Work started: (OPENJPA-1943) Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on OPENJPA-1943 started by Albert Lee.

> Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1943
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1943
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa, kernel
>    Affects Versions: 2.0.1, 2.1.0, 2.2.0
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>             Fix For: 2.1.1, 2.2.0
>
>         Attachments: OPENJPA-1943.patch
>
>
> Query timeout and lock timeout values are stored in fetch plan/configuration. Due to semantic difference between the Query and em API, separate fetch plan/configuration objects are attached to QueryImpl and EntityManagerImpl. 
> When pessimistic lock is enforced by the provider to a query, if the underlying data base requires to generate multiple SQL statements, the timeout value from the QueryImpl is used to execute the data portion of the SQL statements but the timeout value from the EntityManagerImpl is used to issue the "FOR UPDATE" lock to the related table. This caused the discrepancy that the query timeout is NOT being honored. As a result, some database may wait forever and caused a "hung" scenario even the query timeout value is set. 
>     

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (OPENJPA-1943) Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee resolved OPENJPA-1943.
---------------------------------

    Resolution: Fixed

> Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1943
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1943
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa, kernel
>    Affects Versions: 2.0.1, 2.1.0, 2.2.0
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>             Fix For: 2.1.1, 2.2.0
>
>         Attachments: OPENJPA-1943.patch
>
>
> Query timeout and lock timeout values are stored in fetch plan/configuration. Due to semantic difference between the Query and em API, separate fetch plan/configuration objects are attached to QueryImpl and EntityManagerImpl. 
> When pessimistic lock is enforced by the provider to a query, if the underlying data base requires to generate multiple SQL statements, the timeout value from the QueryImpl is used to execute the data portion of the SQL statements but the timeout value from the EntityManagerImpl is used to issue the "FOR UPDATE" lock to the related table. This caused the discrepancy that the query timeout is NOT being honored. As a result, some database may wait forever and caused a "hung" scenario even the query timeout value is set. 
>     

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1943) Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee updated OPENJPA-1943:
--------------------------------

    Patch Info: [Patch Available]

> Query timeout hint not honored consistently when pessimistic lock is issued to database requires multi-statements locking scheme
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1943
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1943
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa, kernel
>    Affects Versions: 2.0.1, 2.1.0, 2.2.0
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>             Fix For: 2.1.1, 2.2.0
>
>         Attachments: OPENJPA-1943.patch
>
>
> Query timeout and lock timeout values are stored in fetch plan/configuration. Due to semantic difference between the Query and em API, separate fetch plan/configuration objects are attached to QueryImpl and EntityManagerImpl. 
> When pessimistic lock is enforced by the provider to a query, if the underlying data base requires to generate multiple SQL statements, the timeout value from the QueryImpl is used to execute the data portion of the SQL statements but the timeout value from the EntityManagerImpl is used to issue the "FOR UPDATE" lock to the related table. This caused the discrepancy that the query timeout is NOT being honored. As a result, some database may wait forever and caused a "hung" scenario even the query timeout value is set. 
>     

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira