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] Updated: (DERBY-3883) LOBStreamControl.replaceBytes() leaves temporary files open
Date Fri, 26 Sep 2008 11:47:44 GMT

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

Knut Anders Hatlen updated DERBY-3883:

    Attachment: d3883.diff

The attached patch moves the code that closes/deletes the old temporary file out of the if
block that it's currently in, so that it will be executed each time replaceBytes() has switched
to a new file.

suites.All ran cleanly with the patch. I'll also run derbyall, and I will see if I can write
some code that exposes the problem and check manually that the patch solves it.

> LOBStreamControl.replaceBytes() leaves temporary files open
> -----------------------------------------------------------
>                 Key: DERBY-3883
>                 URL: https://issues.apache.org/jira/browse/DERBY-3883
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3883.diff
> I haven't seen any problems as a result of this, but the code that closes and deletes
the old temporary file in LOBStreamControl.replaceBytes() looks wrong to me.
> When replaceBytes() is called on a lob that has been materialized into a temporary file,
it will create a new file and copy the relevant parts from the old file. But the old file
is only closed and deleted if the block that is replaced ends before the last byte of the
lob. I believe that the old file should be closed and deleted also when we replace a block
that ends at or after the last byte of the original lob.

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

View raw message