db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2493) Use unsynchronized collections in BackingStoreHashtable
Date Wed, 28 Mar 2007 12:57:25 GMT

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

Knut Anders Hatlen commented on DERBY-2493:
-------------------------------------------

Replacing the Hashtable with a HashMap was trivial, but because of differences between the
implementations of Hashtable and HashMap, the rows come out in different order for some queries
(in particular SELECT DISTINCT). And since the implementation of HashMap changed between JDK5
and JDK6, the order varies between JVMs as well. Three tests will be affected by this change:
  JUnit:
    LangScripts.aggregate
    ResultSetsFromPreparedStatementTest.testDistinctScanResultSet
  derbyall:
    lang/distinct.sql (currently being converted to JUnit, see DERBY-2491)

I don't think the LangScripts tests can handle different results in different JVMs, so that
one will probably have to be converted to pure JUnit in order to work with this change. In
ResultSetsFromPreparedStatementTest it should be possible to use an assert method which didn't
require a specific order.

> Use unsynchronized collections in BackingStoreHashtable
> -------------------------------------------------------
>
>                 Key: DERBY-2493
>                 URL: https://issues.apache.org/jira/browse/DERBY-2493
>             Project: Derby
>          Issue Type: Improvement
>          Components: Performance, Store
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>
> BackingStoreHashtable uses a Vector and a Hashtable, but doesn't need the synchronization
provided by these classes (I think). Replacing them with ArrayList and HashMap could improve
performance for some kinds of operations.

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


Mime
View raw message