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] Commented: (DERBY-2712) If large clob is updated after Reader. the reader continues to point to old data
Date Mon, 11 Jun 2007 15:33:26 GMT

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

Kristian Waagan commented on DERBY-2712:

Hello Anurag,

I reviewed your patch and have the following comments/questions:
 1) Since the method EmbedClob.getInternalStream() has been added, why not rewrite the new
ClobUpdateableReader constructor to only take the EmbedClob-object and fetch the stream by
calling getInternalStream()?

 2)  The code below can loop infinitely.
+        while (remainToSkip > 0) {
+            long skipBy = streamReader.skip(remainToSkip);            
+            remainToSkip -= skipBy;
    A check to see if skipBy == 0 should be added, which if true means the EOF has been reached.
    One must consider under which scenarios this can happen (only programming error?). Would
be better to fail "gracefully" instead of looping for ever.

 3) The instance variable 'clob' in ClobUpdateableReader should be final.

 4) There are some typos in the JavaDoc. Might want to do another pass on it.

 5) Quite a few occurrences of trailing spaces.

 6) A bit unsure about this one in ClobUpdateableReader:
+            if (clob == null) {
+                throw new IOException ("Internal error while " +
+                        "updating stream");
+            }

    This can only happen if there is a programming error. Is IOException the right mechanism
to communicate this?
    What about replacing it with a SanityManager.DEBUG/ASSERT?

 7) A somewhat different issue, but why does the UTF8Reader need the length of the stream?
    I see how it is used in UTF8Reader, but is it really necessary? (btw, this is not something
to be handled under this Jira)

I ran suites.All (1.5) with the patch without failures. I'm running derbyall as we speak.

> If large clob is updated after Reader. the reader continues to point to old data
> --------------------------------------------------------------------------------
>                 Key: DERBY-2712
>                 URL: https://issues.apache.org/jira/browse/DERBY-2712
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:
>            Reporter: Anurag Shekhar
>         Attachments: derby-2712.diff
> If a Reader is fetched from a large clob (obtained from ResultSet) a reader linked to
the dvd stream is returned once a set method is called on it the clob data is materialized
in control class but the Reader returned previously continues to point to old data.

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

View raw message