db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1688) ConsistencyToken.hashCode() is not thread safe
Date Mon, 14 Aug 2006 12:57:17 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1688?page=all ]

Knut Anders Hatlen updated DERBY-1688:

    Attachment: derby-1688.diff

The attached patch makes ConsistencyToken.hashCode() thread safe by using the approach suggested
by The "Double-Checked Locking is Broken" Declaration [1]. Derbyall passes with Sun JVM 1.5.

[1] http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

> ConsistencyToken.hashCode() is not thread safe
> ----------------------------------------------
>                 Key: DERBY-1688
>                 URL: http://issues.apache.org/jira/browse/DERBY-1688
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions:,,
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-1688.diff, derby-1688.stat
> If ConsistencyToken.hashCode() is run concurrently by different threads, some of the
threads may see a partial result instead of the correct hash code. This is not a problem in
the current code since all calls to that method are synchronized on a higher level, but it
would be good to fix in case the method will be used differently in the future.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message