db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3198) Using setQueryTimeout will leak sections
Date Thu, 06 Dec 2007 08:00:57 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548959
] 

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

Thanks for addressing my comments, Dyre. The tests look good, and the fix looks correct and
clear. So I think the patch should be committed.

By the way, Statement.reset() says something about changing the section. I'm not sure if it
applies to the section used by writeSetSpecialRegister(), but you may want to take a look
at it just in case. (I noticed that section_.free() is called more places in the code than
setSpecialRegisterSection_.free(). I think those calls are either related to batching or to
reset(), so I don't think it's important for the special register section, but I wanted to
mention it just in case.)

> Using setQueryTimeout will leak sections 
> -----------------------------------------
>
>                 Key: DERBY-3198
>                 URL: https://issues.apache.org/jira/browse/DERBY-3198
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.3.1.4
>            Reporter: Dyre Tjeldvoll
>            Assignee: Dyre Tjeldvoll
>         Attachments: derby-3198.v1.diff, derby-3198.v2.diff, derby-3198.v3.diff, derby-3198.v4.diff,
derby-3198.v5.diff, repro.diff
>
>
> The implementation of setQueryTimeout relies on NetStatementReply.writeSetSpecialRegister()
which will allocate a dynamic section when called. No reference to this Section object is
kept, and so Section.free() never gets called on it. Executing the same statment repeatedly
with a query timeout set results in the client driver throwing an exception because the number
of Sections exceeding 32000.

-- 
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