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-2713) Ensure that a temporary file is not created for a lob obtained from resultset unless user updates it.
Date Fri, 01 Jun 2007 14:20:15 GMT

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

Knut Anders Hatlen commented on DERBY-2713:

Hi Anurag, I looked at the patch and have a couple of questions:

1) LOBStreamControl calls a protected method initControl() from its constructor to set the
buffer size. Wouldn't it be better to put that code into the new constructor? That would allow
bufferSize to be final.

2) The new constructor for LOBStreamControl is only used by EmbedBlob(byte[],EmbedConnection).
Shouldn't it also have been used by EmbedBlob(DataValueDescriptor,EmbedConnection) when dvd.getStream()
returns null?

3) Should EmbedClob(String,EmbedConnection) have used the new ClobStreamControl constructor?

4) I was wondering, should LOBStreamControl.init() set dataBytes to null? It doesn't seem
to be used after init() has been called.

5) I noticed this diff:
         while (sz < length) {
-            int len = (int) (((length - sz) >= MAX_BUF_SIZE) ? MAX_BUF_SIZE
+            int len = (int) (((length - sz) >= bufferSize) ? bufferSize
                     : length - sz);

Would it have been clearer if it was written as Math.min(...)?

6) Typos in class javadoc for LOBStreamControl: "suplied" -> "supplied", "indial" ->

7) Could you reword this comment in LOBStreamControl? It's not quite clear to me what it means.
"If the class is created with initial data, the buffer 
+ * size is set to the size of the byte array suplied the buffer size is set
+ * to DEFAULT_MAX_BUF_SIZE is an empty LOBStreamControl is created or if the 
+ * initial data is smaller than DEFAULT_MAX_BUF_SIZE."

8) Typos in javadoc for LOBStreamControl.initControl(): "initialzes" -> "initializes",
"initialze" -> "initialize"

> Ensure that a temporary file is not created for a lob obtained from resultset unless
user updates it.
> -----------------------------------------------------------------------------------------------------
>                 Key: DERBY-2713
>                 URL: https://issues.apache.org/jira/browse/DERBY-2713
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For:
>         Attachments: derby-2713.diff
> Currently LOBStreamControl has a buffer limit of 4k if the lob is larger than this a
temporary file is created. Ensure that lob data is kept in memory unless user start to update

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

View raw message