Re: [Discuss] Refactoring KahaDBStore class
I'm not really sure this is worthwhile or something we want to do...I would
have to think about it more before I gave it a +1.
While cleaning up code is nice KahaDB has gotten pretty stable over the
years and doing a bunch of refactoring just opens it up to new bugs that
have to be fixed. Fixing bugs is not a problem however I tend to be more
sensitive to store related changes because of the possible data loss or
corruption issues to production data that can occur from store bugs vs some
other random bug in the broker.
On Sun, Nov 25, 2018 at 11:59 PM Jean-Baptiste Onofré <jb@xxxxxxxxxxxx>
> OK, got it. It's more a syntax/codebase organization refactoring.
> If there's no impact on the behavior and features, +1 from my side.
> On 25/11/2018 21:21, Jamie G. wrote:
> > Initially its to make KahaDB classes easier to read & maintain.
> > Eventually it will help in features/performance; smaller classes are
> > easier to grok, easier to see improvements.
> > Instead of trying to refactor all of it in one go, I'm taking the
> > approach of one area at a time.
> > One pass for breaking out objects.
> > Another pass for small functional improvements.
> > Perhaps future passes for new Java features (bring all code up to Java
> > 8 perhaps?).
> > On Sun, Nov 25, 2018 at 4:32 PM Jean-Baptiste Onofré <jb@xxxxxxxxxxxx>
> >> Hi Jamie,
> >> That's interesting.
> >> What's the rationale behind the refactoring ? New features or perf
> >> improvements ?
> >> Regards
> >> JB
> >> On 25/11/2018 20:16, Jamie G. wrote:
> >>> Hi All,
> >>> I've taken some time to prototype a refactored KahaDBStore class:
> >>> https://github.com/jgoodyear/activemq/tree/KahaDBRefactor
> >>> As KahaDBStore exists in Master, it contains 7 internal classes, over
> >>> some 1677 lines of code.
> >>> In my refactor branch I've separated out those classes into their own
> >>> files, and applied some gentle clean code practices to help make these
> >>> files easier to read and maintain.
> >>> I'd like to gather feed back from the community; I've taken care to
> >>> change functionality as little as possible - the aim here is to reduce
> >>> complexity and improve maintainability. If the community feels this is
> >>> a worth while goal than I'll open a card on Jira & prepare a PR.
> >>> Notes:
> >>> ActiveMQ KahaDB Store and ActiveMQ-Unit-Tests suites remain passing
> >>> after refactor.
> >>> Cheers,
> >>> Jamie
> >> --
> >> Jean-Baptiste Onofré
> >> jbonofre@xxxxxxxxxx
> >> http://blog.nanthrax.net
> >> Talend - http://www.talend.com
> Jean-Baptiste Onofré
> Talend - http://www.talend.com