You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2008/06/18 13:18:45 UTC

[jira] Created: (DERBY-3726) Don't call RAFContainer.padFile() from instances of RAFContainer4

Don't call RAFContainer.padFile() from instances of RAFContainer4
-----------------------------------------------------------------

                 Key: DERBY-3726
                 URL: https://issues.apache.org/jira/browse/DERBY-3726
             Project: Derby
          Issue Type: Improvement
          Components: Store
    Affects Versions: 10.4.1.3, 10.3.3.0
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen
            Priority: Minor


In this thread on derby-dev, http://mail-archives.apache.org/mod_mbox/db-derby-dev/200806.mbox/%3c48530848.3020501@sbcglobal.net%3e,
it was mentioned that RAFContainer4 calls padFile() when creating a container. Since padFile() uses old I/O calls and the rest of RAFContainer4 uses NIO, it could possibly cause similar issues as those seen in DERBY-3347. Although we haven't verified that this is a problem, we should try to avoid mixing old I/O and NIO to be on the safe side.

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


[jira] Closed: (DERBY-3726) Don't call RAFContainer.padFile() from instances of RAFContainer4

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-3726.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.3.1

Merged to 10.3 and committed revision 671567.

> Don't call RAFContainer.padFile() from instances of RAFContainer4
> -----------------------------------------------------------------
>
>                 Key: DERBY-3726
>                 URL: https://issues.apache.org/jira/browse/DERBY-3726
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.3.3.0, 10.4.1.3
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.3.3.1, 10.4.1.4, 10.5.0.0
>
>         Attachments: d3726-1a.diff
>
>
> In this thread on derby-dev, http://mail-archives.apache.org/mod_mbox/db-derby-dev/200806.mbox/%3c48530848.3020501@sbcglobal.net%3e,
> it was mentioned that RAFContainer4 calls padFile() when creating a container. Since padFile() uses old I/O calls and the rest of RAFContainer4 uses NIO, it could possibly cause similar issues as those seen in DERBY-3347. Although we haven't verified that this is a problem, we should try to avoid mixing old I/O and NIO to be on the safe side.

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


[jira] Updated: (DERBY-3726) Don't call RAFContainer.padFile() from instances of RAFContainer4

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3726:
--------------------------------------

    Fix Version/s: 10.4.1.4

Merged to 10.4 and committed revision 671480.

> Don't call RAFContainer.padFile() from instances of RAFContainer4
> -----------------------------------------------------------------
>
>                 Key: DERBY-3726
>                 URL: https://issues.apache.org/jira/browse/DERBY-3726
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.3.3.0, 10.4.1.3
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.4.1.4, 10.5.0.0
>
>         Attachments: d3726-1a.diff
>
>
> In this thread on derby-dev, http://mail-archives.apache.org/mod_mbox/db-derby-dev/200806.mbox/%3c48530848.3020501@sbcglobal.net%3e,
> it was mentioned that RAFContainer4 calls padFile() when creating a container. Since padFile() uses old I/O calls and the rest of RAFContainer4 uses NIO, it could possibly cause similar issues as those seen in DERBY-3347. Although we haven't verified that this is a problem, we should try to avoid mixing old I/O and NIO to be on the safe side.

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


[jira] Updated: (DERBY-3726) Don't call RAFContainer.padFile() from instances of RAFContainer4

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3726:
--------------------------------------

    Attachment: d3726-1a.diff

padFile() is called from three locations in RAFContainer. Two of the calls come from writePage(), which is overloaded in RAFContainer4 and therefore not called by RAFContainer4. The last one is in writeRAFHeader() where it is called if the container is being created.

This last call is the one we'll need to get rid of for RAFContainer4, and it is actually quite easy to get rid of it for RAFContainer as well. Here's what writeRAFHeader() does when it's called with create=true:

a) get an empty embryonic page by calling getEmbryonicPage(null), which is the same as calling new byte[AllocPage.MAX_BORROWED_SPACE].

b) pass the empty embryonic page to writeHeader() which initializes it and writes it to the file

c) call padFile() to make sure the file ends on a page boundary (to work around a bug in the EPOC jvm)

Now, if the the byte array returned from getEmbryonicPage(null) had the size of a full page instead of just a fraction of a page, the call to writeHeader() would automatically give us a file that ended on a page boundary. The attached patch (d3726-1a) therefore replaces the call to getEmbryonicPage(null) with new byte[pageSize], and then it can also remove the call to padFile() and the special handling of fileData==null in getEmbryonicPage().

Derbyall and suites.All ran cleanly on Solaris 10/JDK 6.

> Don't call RAFContainer.padFile() from instances of RAFContainer4
> -----------------------------------------------------------------
>
>                 Key: DERBY-3726
>                 URL: https://issues.apache.org/jira/browse/DERBY-3726
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.3.3.0, 10.4.1.3
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3726-1a.diff
>
>
> In this thread on derby-dev, http://mail-archives.apache.org/mod_mbox/db-derby-dev/200806.mbox/%3c48530848.3020501@sbcglobal.net%3e,
> it was mentioned that RAFContainer4 calls padFile() when creating a container. Since padFile() uses old I/O calls and the rest of RAFContainer4 uses NIO, it could possibly cause similar issues as those seen in DERBY-3347. Although we haven't verified that this is a problem, we should try to avoid mixing old I/O and NIO to be on the safe side.

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


[jira] Updated: (DERBY-3726) Don't call RAFContainer.padFile() from instances of RAFContainer4

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3726:
--------------------------------------

    Derby Info: [Patch Available]

> Don't call RAFContainer.padFile() from instances of RAFContainer4
> -----------------------------------------------------------------
>
>                 Key: DERBY-3726
>                 URL: https://issues.apache.org/jira/browse/DERBY-3726
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.3.3.0, 10.4.1.3
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3726-1a.diff
>
>
> In this thread on derby-dev, http://mail-archives.apache.org/mod_mbox/db-derby-dev/200806.mbox/%3c48530848.3020501@sbcglobal.net%3e,
> it was mentioned that RAFContainer4 calls padFile() when creating a container. Since padFile() uses old I/O calls and the rest of RAFContainer4 uses NIO, it could possibly cause similar issues as those seen in DERBY-3347. Although we haven't verified that this is a problem, we should try to avoid mixing old I/O and NIO to be on the safe side.

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


[jira] Updated: (DERBY-3726) Don't call RAFContainer.padFile() from instances of RAFContainer4

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-3726:
--------------------------------------

       Derby Info:   (was: [Patch Available])
    Fix Version/s: 10.5.0.0

Thanks for looking at the patch, Kristian. Committed revision 670534.

I wasn't sure whether to keep the workaround for the EPOC bug or not, but I found it safest to keep it for now.

I'm planning to port the fix to 10.4 and possibly 10.3 as well.

> Don't call RAFContainer.padFile() from instances of RAFContainer4
> -----------------------------------------------------------------
>
>                 Key: DERBY-3726
>                 URL: https://issues.apache.org/jira/browse/DERBY-3726
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.3.3.0, 10.4.1.3
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: d3726-1a.diff
>
>
> In this thread on derby-dev, http://mail-archives.apache.org/mod_mbox/db-derby-dev/200806.mbox/%3c48530848.3020501@sbcglobal.net%3e,
> it was mentioned that RAFContainer4 calls padFile() when creating a container. Since padFile() uses old I/O calls and the rest of RAFContainer4 uses NIO, it could possibly cause similar issues as those seen in DERBY-3347. Although we haven't verified that this is a problem, we should try to avoid mixing old I/O and NIO to be on the safe side.

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


[jira] Commented: (DERBY-3726) Don't call RAFContainer.padFile() from instances of RAFContainer4

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607181#action_12607181 ] 

Kristian Waagan commented on DERBY-3726:
----------------------------------------

The patch looks good to me.
I'm not sure we really need the EPOC JVM bug workaround, but it doesn't seem to affect Derby negatively to keep it.

+1 to commit.

> Don't call RAFContainer.padFile() from instances of RAFContainer4
> -----------------------------------------------------------------
>
>                 Key: DERBY-3726
>                 URL: https://issues.apache.org/jira/browse/DERBY-3726
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.3.3.0, 10.4.1.3
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d3726-1a.diff
>
>
> In this thread on derby-dev, http://mail-archives.apache.org/mod_mbox/db-derby-dev/200806.mbox/%3c48530848.3020501@sbcglobal.net%3e,
> it was mentioned that RAFContainer4 calls padFile() when creating a container. Since padFile() uses old I/O calls and the rest of RAFContainer4 uses NIO, it could possibly cause similar issues as those seen in DERBY-3347. Although we haven't verified that this is a problem, we should try to avoid mixing old I/O and NIO to be on the safe side.

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