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-4678) Avoid code duplication in GenericConglomerateController.fetch()
Date Thu, 27 May 2010 17:38:38 GMT

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

Mike Matrigali updated DERBY-4678:
----------------------------------


fetch() is a very high traffic routine for store.  It used to be the case that adding an extra
procedure call to this path was a measurable performance overhead.  It even used to be the
case that adding the pushing of an extra parameter was measurable.  I have no
idea with modern JVM's and JIT's if this is still the case.

If it seems worth it to get rid of the code duplication at the cost of pushing an extra parameter
I would rather see us just get rid of the whole 3 parameter fetch interface and do the code
rototill to change the 3 param call to a 4 param call with true.

It probably does touch a lot of files, but in java it is a pretty safe change because once
you get rid of the 3 parameter implementation and protocol the compiler catches all the problems.

> Avoid code duplication in GenericConglomerateController.fetch()
> ---------------------------------------------------------------
>
>                 Key: DERBY-4678
>                 URL: https://issues.apache.org/jira/browse/DERBY-4678
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.7.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-4678-1a.diff, fetch.diff
>
>
> GenericConglomerateController has two methods named fetch(). One of these methods has
a parameter called waitForLock, whereas the other one doesn't have such a parameter. When
I diffed the two methods, the only difference I found, apart from a couple of whitespace diffs,
was that the method with the waitForLock parameter called lockPosititionForRead/lockPositionForWrite
using the parameter value, and the other method called them with a hard-coded value of true.
> To avoid duplication of code, fetch(RowLocation,DataValueDescriptor[],FormatableBitSet)
should forward calls to fetch(RowLocation,DataValueDescriptor[],FormatableBitSet,boolean).

-- 
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