[
https://issues.apache.org/jira/browse/DERBY-2114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481937
]
Knut Anders Hatlen commented on DERBY-2114:
-------------------------------------------
Thank you for addressing my comments! There is one thing I missed in the
previous review:
+ public boolean containsKey(Object k) {
+ synchronized(cache_) {
+ public Collection values() {
+ synchronized (cache_) {
I believe these two methods should have been synchronized on this, not on
cache_. I have made that change to the patch and started the regression tests.
Will commit if the tests don't fail.
> Let Clock embed a HashMap rather than inherit from Hashtable
> ------------------------------------------------------------
>
> Key: DERBY-2114
> URL: https://issues.apache.org/jira/browse/DERBY-2114
> Project: Derby
> Issue Type: Improvement
> Components: Performance
> Affects Versions: 10.2.1.6
> Reporter: Dyre Tjeldvoll
> Assigned To: Dyre Tjeldvoll
> Priority: Trivial
> Fix For: 10.3.0.0
>
> Attachments: derby-2114.v1.diff, derby-2114.v1.stat,
> derby-2114.v2.diff, derby-2114.v2.stat
>
>
> Clock currently inherits from Hashtable, but the use of Hashtable is really
> an implementation detail that would benefit from being hidden as private
> member. All access to the hashtable happens inside sychronized blocks so it
> is safe to substitute a HashMap. This change appears to trigger a small
> increase in throughput, as measured by the average TPS number obtained by
> running the select client from DERBY-1961 repeatedly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.