You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2007/04/27 10:12:15 UTC

[jira] Created: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Language result sets should not reuse current isolation level across executions
-------------------------------------------------------------------------------

                 Key: DERBY-2597
                 URL: https://issues.apache.org/jira/browse/DERBY-2597
             Project: Derby
          Issue Type: Sub-task
    Affects Versions: 10.3.0.0
            Reporter: Knut Anders Hatlen
         Assigned To: Knut Anders Hatlen


Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-2597.
-------------------------------------


> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2597-1.diff, derby-2597-1.stat, derby-2597-2.diff, derby-2597-3.diff, derby-2597-3.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2597:
--------------------------------------

    Attachment: derby-2597-1.stat
                derby-2597-1.diff

The attached patch (derby-2597-1) solves the problem for HashScanResultSet, TableScanResultSet and LastIndexKeyResultSet (and their sub-classes) by refreshing the isolation level on each open. Since the code that found the correct isolation level and lock mode was almost identical in all those classes, I created a common base class for them (ScanResultSet) and removed the duplicated code.

With this patch, ResultSetsFromPreparedStatementTest runs cleanly even with the DERBY-827 patch applied.

Derbyall and suites.All ran cleanly on Solaris 10, Java 1.6.

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-2597-1.diff, derby-2597-1.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen resolved DERBY-2597.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.0.0
       Derby Info:   (was: [Patch Available])

Committed derby-2597-3 with revision 537128.

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2597-1.diff, derby-2597-1.stat, derby-2597-2.diff, derby-2597-3.diff, derby-2597-3.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2597:
--------------------------------------

    Attachment: derby-2597-3.stat
                derby-2597-3.diff

Attaching derby-2597-3 which fixes the failure in testUpdateResultSetWithIsolation() when running with the DERBY-827 patch. What the patch does, is:

1) Move the static method UpdateResultSet.decodeLockMode() into DMLWriteResultSet and make it non-static. This makes it possible to add debug code that checks that it is only called when the {Update,Delete,Insert}ResultSet has been opened (to prevent calls at ResultSet construction time).

2) Move UpdateResultSet's call to decodeLockMode() from the constructor to open().

3) Make the NoRowsResultSetImpl class hierarchy maintain an isOpen variable that is set to true on open and to false on close. Previously, an isClosed variable was used, which was false until the first call to close(), after which it would be true forever even after the RS was reopened. This change was necessary to be able to assert that the result set had been opened in decodeLockMode().

With this patch, I think all result set classes are able to detect isolation level changes between executions.

Derbyall and suites.All ran cleanly with the patch (except the tests that currently fail in the Tinderbox). The patch is ready for review. Thanks.

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-2597-1.diff, derby-2597-1.stat, derby-2597-2.diff, derby-2597-3.diff, derby-2597-3.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2597:
--------------------------------------

    Derby Info: [Patch Available]

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-2597-1.diff, derby-2597-1.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2597:
--------------------------------------

    Derby Info: [Patch Available]

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-2597-1.diff, derby-2597-1.stat, derby-2597-2.diff, derby-2597-3.diff, derby-2597-3.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494547 ] 

Knut Anders Hatlen commented on DERBY-2597:
-------------------------------------------

Committed derby-2597-2.diff with revision 536613.

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-2597-1.diff, derby-2597-1.stat, derby-2597-2.diff
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2597:
--------------------------------------

    Derby Info:   (was: [Patch Available])

Committed derby-2597-1.diff with revision 535860.

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-2597-1.diff, derby-2597-1.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-2597:
---------------------------------

    Derby Categories: [Performance]

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 10.3.1.4
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>             Fix For: 10.3.1.4
>
>         Attachments: derby-2597-1.diff, derby-2597-1.stat, derby-2597-2.diff, derby-2597-3.diff, derby-2597-3.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2597) Language result sets should not reuse current isolation level across executions

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

Mike Matrigali updated DERBY-2597:
----------------------------------

    Component/s: SQL
                 Performance

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-2597-1.diff, derby-2597-1.stat
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-2597) Language result sets should not reuse current isolation level across executions

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-2597:
--------------------------------------

    Attachment: derby-2597-2.diff

Attaching patch which adds a JUnit fixture which tests whether an UpdateResultSet is able to detect changes in isolation level between executions. The test passes on trunk, but fails when the patch for DERBY-827 is applied (it continues with table-level locking after changing isolation level from serializable to read committed).

> Language result sets should not reuse current isolation level across executions
> -------------------------------------------------------------------------------
>
>                 Key: DERBY-2597
>                 URL: https://issues.apache.org/jira/browse/DERBY-2597
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Performance, SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>         Attachments: derby-2597-1.diff, derby-2597-1.stat, derby-2597-2.diff
>
>
> Some of the language result sets cache the current isolation level in their constructors. To allow reuse of the result sets, they should check the isolation level each time they are opened. Currently, this affects HashScanResultSet, TableScanResultSet, LastIndexKeyResultSet and UpdateResultSet (and their sub-classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.