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-4678) Avoid code duplication in GenericConglomerateController.fetch()
Date Fri, 28 May 2010 07:29:36 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12872886#action_12872886

Knut Anders Hatlen commented on DERBY-4678:

Thanks for the input, Mike. I will try to come up with a small test that stresses fetch()
to see if the change has any measurable impact before I commit the patch. I agree that if
it turns out to be a harmless change, removing the 3-arg method altogether would be a good
next step. It's called 18 places in the engine code and 12 places in the store unit tests.

My main motivation for doing this is to reduce the number of places where DERBY-4676 needs
to be fixed, and thereby also to reducing the number of tests needed in order to exercise
all the new code introduced by the fix.

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

View raw message