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-3441) Determine and implement a proper procedure for resetting a prepared statement for reuse in a statement pool
Date Wed, 27 Feb 2008 15:09:51 GMT

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

Kristian Waagan updated DERBY-3441:
-----------------------------------

    Attachment: derby-3441-1b-statement_reset.diff

'derby-3441-1b-statement_reset.diff' is another try at a proper reset procedure.
The following has been changed:
 a) Added JavaDoc to Statement.resetForReuse
 b) Extracted "user controllable attributes" from the init method, and put them into a separate
method.
    These attributes must be reset when the statement is put into the cache.
    Examples are query timeout, fetch direction hint and max rows to fetch.
 c) The allowAutoCommit argument for willTickleServer(), is now set to connection_.autoCommit
    Does anyone have any useful info on the willTickleServer method?
 d) Calling batch_.clear() (ArrayList) instead of clearBatch(), to avoid catching/throwing
SQLException.
    See related comment for patch 2a above.
 e) Removed the outer try-catch clause, and the method now throws SqlException.

Dan, I hope your comments are addressed.
Having slugged through the code, did anything come across as strange?
I.e. why is X reset, but not Y?

Patch ready for review.
I hope to commit later today, even if I don't have full confidence in the patch. It is a lot
better than the current solution anyway, and I'll work on improving it. When the patch for
this issue is committed, I will enable the statement pooling code by committing DERBY-3329.

The other know new defect is DERBY-3457, which has a patch awaiting review as well.

> Determine and implement a proper procedure for resetting a prepared statement for reuse
in a statement pool
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3441
>                 URL: https://issues.apache.org/jira/browse/DERBY-3441
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC, Network Client
>    Affects Versions: 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3441-1a-statement_reset.diff, derby-3441-1b-statement_reset.diff,
derby-3441-2a-minor_am_refactoring.diff
>
>
> Initial investigations indicate there are no existing suitable methods to properly reset
a prepared (or callable) statement for reuse with a statement pool.
> A full reset is too heavy weight and defeats the purpose of statement pooling, but a
proper procedure should be achievable by reusing existing pieces of code.
> Correctness is of course the most important thing.

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


Mime
View raw message