db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-1958) improve XSDG3 error to print container, actual i/o operation, and file name.
Date Wed, 21 Jul 2010 19:11:51 GMT

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

Mike Matrigali updated DERBY-1958:

I am not sure it is worth it for this internal error, but you should not be passing english
words as parameters to the error message.  ie. passing "read" in.   By doing this it is impossible
to have the
error message correctly translated.  The options are either to not have the parameter and
different error messages, or there is a facility to pass in a message id that can be translated.
is heavily used for stuff like query plan printing.  Again as an internal message it may be
ok, but in general it should not be used.

If you go down the route of adding to/creating a toString() I would give up on translation
as that would
fall more into a "dump" and probably be ok to not translate.

The usual info printed for a container in an error message I  think comes from a ContainerKey.
 I think you can get this from a getIdentity() call.  See the SQLState.DATA_UNKNOWN_CONTAINER_FORMAT
error thrown in the FileContainer class.  

Historically (pre-open source) not a lot of "toString()" were implemented, and if they were
they were often only implemented in SANE mode with the following type of construct:
public String toString()
    if (SanityManager.DEBUG)
        String str =
            "*** Alloc page ***\n"      +
            "nextAllocPageNumber = "    + nextAllocPageNumber   +
            "\nnextAllocPageOffset = "  + nextAllocPageOffset   +
            "\nreserved1 = "            + reserved1             +
            "\nreserved2 = "            + reserved2             +
            "\nreserved3 = "            + reserved3             +
            "\nreserved4 = "            + reserved4             +
            "\nborrowedSpace = "        + borrowedSpace         +
            "\nextent = "               + extent.toDebugString() + "\n" +
        return str;
        return null;

  This was to keep the foot print as small as possible, and recognizing that they were not

> improve XSDG3 error to print container, actual i/o operation, and file name.
> ----------------------------------------------------------------------------
>                 Key: DERBY-1958
>                 URL: https://issues.apache.org/jira/browse/DERBY-1958
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions:,,
>            Reporter: Mike Matrigali
>            Priority: Trivial
>         Attachments: Derby-1958.diff
> The current error does not give enough information to know what container is the problem:
> ERROR XSDG3: Meta-data for Container
> org.apache.derby.impl.store.raw.data.RAFContainer@10632cd could not be
> accessed 

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

View raw message