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] Updated: (DERBY-4918) Minor refactoring of SPSDescriptor
Date Fri, 03 Dec 2010 12:05:11 GMT

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

Kristian Waagan updated DERBY-4918:

    Attachment: derby-4918-2a-remove_setUUID.diff

Attaching patch 2a, which removes the method setUUID.

I made the getUUID-method synchronized as part of patch 1a. Turns out this caused a Java deadlock
in one test when running with the automatic index statistics update feature.
Investigation revealed that this method can actually be removed, which makes the uuid variable
final. This allows for keeping getUUID unsynchronized.
I did add code to fail if null is passed in as null in the constructor, where a NullPointerException
will be thrown.

suites.All passed, will run derbyall too.
Patch ready for review.

> Minor refactoring of SPSDescriptor
> ----------------------------------
>                 Key: DERBY-4918
>                 URL: https://issues.apache.org/jira/browse/DERBY-4918
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For:
>         Attachments: derby-4918-1a-misc.diff, derby-4918-1a-misc.stat, derby-4918-2a-remove_setUUID.diff
> The class SPSDescriptor is kind of hard to understand, and doesn't quite follow the pattern
used by other tuple descriptors. Parts of the code don't agree with the documentation (i.e.
SPS_TYPE_TRIGGER marked as not implemented)
> This issue tracks work to make the class easier to understand and to modify.
> The critical part that may need to be changed is the use of synchronized (this). The
problem is that database locks are obtained within the critical regions, and in some special
cases this causes deadlocks. I'm not yet certain this can be fixed at this level (only), but
I'll continue investigation.

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

View raw message