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 "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2007/12/04 16:59:43 UTC

[jira] Created: (DERBY-3247) Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it

Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-3247
                 URL: https://issues.apache.org/jira/browse/DERBY-3247
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.3.1.4, 10.4.0.0
            Reporter: Daniel John Debrunner
            Assignee: Daniel John Debrunner
            Priority: Minor


In a Java procedure called from SQL any dynamic ResultSets that are created using a PreparedStatement or CallableStatement leave their activations open until :
   - the statement that created it is garbage collected (which requires the outer statement to be garbage collected)
   - and the LCC processes unused Activations.

Dynamic ResultSets that are created by a Statement object are handled correctly because they are marked single use activation and thus the close of the ResultSet also closes the activation.

Fix is to mark the activation as single use in EmbedResultSet when the EmbedResultSet is marked as being a dynamic ResultSet. This will then lead to the close of the ResultSet also closing the activation.

Can't see how to write a test for this, I can see the activations stacking up in a debugger, but typically there will be no visible user impact.

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


[jira] Updated: (DERBY-3247) Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it

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

Daniel John Debrunner updated DERBY-3247:
-----------------------------------------

    Derby Info: [Patch Available]

> Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3247
>                 URL: https://issues.apache.org/jira/browse/DERBY-3247
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.4, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>            Priority: Minor
>         Attachments: derby3247_diff.txt
>
>
> In a Java procedure called from SQL any dynamic ResultSets that are created using a PreparedStatement or CallableStatement leave their activations open until :
>    - the statement that created it is garbage collected (which requires the outer statement to be garbage collected)
>    - and the LCC processes unused Activations.
> Dynamic ResultSets that are created by a Statement object are handled correctly because they are marked single use activation and thus the close of the ResultSet also closes the activation.
> Fix is to mark the activation as single use in EmbedResultSet when the EmbedResultSet is marked as being a dynamic ResultSet. This will then lead to the close of the ResultSet also closing the activation.
> Can't see how to write a test for this, I can see the activations stacking up in a debugger, but typically there will be no visible user impact.

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


[jira] Closed: (DERBY-3247) Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it

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

Daniel John Debrunner closed DERBY-3247.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.2.2

Revision: 610895 in 10.3 branch.

> Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3247
>                 URL: https://issues.apache.org/jira/browse/DERBY-3247
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.4, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>            Priority: Minor
>             Fix For: 10.3.2.2, 10.4.0.0
>
>         Attachments: derby3247_diff.txt
>
>
> In a Java procedure called from SQL any dynamic ResultSets that are created using a PreparedStatement or CallableStatement leave their activations open until :
>    - the statement that created it is garbage collected (which requires the outer statement to be garbage collected)
>    - and the LCC processes unused Activations.
> Dynamic ResultSets that are created by a Statement object are handled correctly because they are marked single use activation and thus the close of the ResultSet also closes the activation.
> Fix is to mark the activation as single use in EmbedResultSet when the EmbedResultSet is marked as being a dynamic ResultSet. This will then lead to the close of the ResultSet also closing the activation.
> Can't see how to write a test for this, I can see the activations stacking up in a debugger, but typically there will be no visible user impact.

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


[jira] Updated: (DERBY-3247) Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it

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

Daniel John Debrunner updated DERBY-3247:
-----------------------------------------

    Attachment: derby3247_diff.txt

Patch that marks an Activation for a dynamic EmbedResultSet as single use to ensure it is closed when the ResultSet is closed.

Also add some comments to EmbedStatement.finalize() that indicate it's ok not to handle the result sets in dynamicResults.

Will run tests on the patch but expect them to succeed since this is only moving a close earlier.

> Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3247
>                 URL: https://issues.apache.org/jira/browse/DERBY-3247
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.4, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>            Priority: Minor
>         Attachments: derby3247_diff.txt
>
>
> In a Java procedure called from SQL any dynamic ResultSets that are created using a PreparedStatement or CallableStatement leave their activations open until :
>    - the statement that created it is garbage collected (which requires the outer statement to be garbage collected)
>    - and the LCC processes unused Activations.
> Dynamic ResultSets that are created by a Statement object are handled correctly because they are marked single use activation and thus the close of the ResultSet also closes the activation.
> Fix is to mark the activation as single use in EmbedResultSet when the EmbedResultSet is marked as being a dynamic ResultSet. This will then lead to the close of the ResultSet also closing the activation.
> Can't see how to write a test for this, I can see the activations stacking up in a debugger, but typically there will be no visible user impact.

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


[jira] Reopened: (DERBY-3247) Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it

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

Daniel John Debrunner reopened DERBY-3247:
------------------------------------------


To marked fixed in 10.3

> Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3247
>                 URL: https://issues.apache.org/jira/browse/DERBY-3247
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.4, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby3247_diff.txt
>
>
> In a Java procedure called from SQL any dynamic ResultSets that are created using a PreparedStatement or CallableStatement leave their activations open until :
>    - the statement that created it is garbage collected (which requires the outer statement to be garbage collected)
>    - and the LCC processes unused Activations.
> Dynamic ResultSets that are created by a Statement object are handled correctly because they are marked single use activation and thus the close of the ResultSet also closes the activation.
> Fix is to mark the activation as single use in EmbedResultSet when the EmbedResultSet is marked as being a dynamic ResultSet. This will then lead to the close of the ResultSet also closing the activation.
> Can't see how to write a test for this, I can see the activations stacking up in a debugger, but typically there will be no visible user impact.

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


[jira] Resolved: (DERBY-3247) Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it

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

Daniel John Debrunner resolved DERBY-3247.
------------------------------------------

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

Revision: 601386 applied to trunk.

> Activation for a dynamic ResultSet created from an Prepared/CallableStatement will not be closed until garbage collection indicates it is unused to the LCC and the LCC closes it
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3247
>                 URL: https://issues.apache.org/jira/browse/DERBY-3247
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.4, 10.4.0.0
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby3247_diff.txt
>
>
> In a Java procedure called from SQL any dynamic ResultSets that are created using a PreparedStatement or CallableStatement leave their activations open until :
>    - the statement that created it is garbage collected (which requires the outer statement to be garbage collected)
>    - and the LCC processes unused Activations.
> Dynamic ResultSets that are created by a Statement object are handled correctly because they are marked single use activation and thus the close of the ResultSet also closes the activation.
> Fix is to mark the activation as single use in EmbedResultSet when the EmbedResultSet is marked as being a dynamic ResultSet. This will then lead to the close of the ResultSet also closing the activation.
> Can't see how to write a test for this, I can see the activations stacking up in a debugger, but typically there will be no visible user impact.

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