db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3457) Closing a logical connection must close all associated logical statements
Date Sat, 23 Feb 2008 19:49:19 GMT

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

Kristian Waagan updated DERBY-3457:

    Attachment: derby-3457-1a-stmt_closing.stat

'derby-3457-1a-stmt_closing.diff' is a fix that makes closing a caching logical statement
close all associated logical statements as well.
One thing I'd like feedback on, is what we should do if closing a statement throws an exception?
 a) swallow it, abandon the logical statement and continue
 b) throw the exception to the user (on the first occurrence)
 c) catch exception, continue closing remaining statements, then rethrow exception
 d) <your-approach-here>
Patch 1a does (a).

I have a test for the issue, but it needs some polishing before I post it. It contains a number
of other tests for statement pooling as well.
When testing I happened to forget applying the patch that enables statement pooling, but the
test still failed. I will investigate further (more testing and search JIRA) and see if there
is an existing bug in the client driver (when doing connection pooling) or if my test is incorrect.

Patch ready for review.

> Closing a logical connection must close all associated logical statements
> -------------------------------------------------------------------------
>                 Key: DERBY-3457
>                 URL: https://issues.apache.org/jira/browse/DERBY-3457
>             Project: Derby
>          Issue Type: Task
>          Components: JDBC, Network Client
>    Affects Versions:
>         Environment: Client-server with statement pooling enabled in the client driver.
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>             Fix For:
>         Attachments: derby-3457-1a-stmt_closing.diff, derby-3457-1a-stmt_closing.stat
> When a logical connection is closed, all open logical statements created by this connection
must be closed.
> The closing is important per the general principle of cleaning up resources, but especially
so in the case of statement pooling, as not closing the logical statement can cause side effects
on another logical connection (sharing the same physical connection).

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

View raw message