[ 
https://issues.apache.org/jira/browse/SOLR-12955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16674187#comment-16674187
 ] 

Bar Rotstein edited comment on SOLR-12955 at 11/3/18 8:24 PM:
--------------------------------------------------------------

I started trying to separate the class into 2 distinct classes 
DistributedZookeeperUpdateProcessor and DistributedStandAloneUpdateProcessor.
 The former is for clusters which are manged by ZK, while the latter is used by 
standalone clusters.

One concern I have has to do with the way Cdcr Update Processor was refactored.
 I could not find a neat way to get CdcrUpdateProcessor to subclass each one of 
the two new classes without code duplication.
 This refactor has made it difficult since either CdcrUpdateProcessor extends 
DistributedZookeeperUpdateProcessor in case the cluster is managed by Zookeeper,
 or otherwise, it extends DistributedStandAloneUpdateProcessor.


was (Author: brot):
I started trying to separate the class into 2 distinct classes 
DistributedZookeeperUpdateProcessor and DistributedStandAloneUpdateProcessor.
The former is for clusters which are manged by ZK, while the latter is used by 
standalone clusters.

One concern I have has to do with the way Cdcr Update Processor was refactored.
I could not find a neat way to get CdcrUpdateProcessor to subclass each one of 
the two new classes without code duplication.
This refactor has made it difficult since now Cdcr needs to extend 
DistributedZookeeperUpdateProcessor incase the cluster is managed by Zookeeper,
or extend DistributedStandAloneUpdateProcessor otherwise.

> Refactor DistributedUpdateProcessor
> -----------------------------------
>
>                 Key: SOLR-12955
>                 URL: https://issues.apache.org/jira/browse/SOLR-12955
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Bar Rotstein
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Lately As I was skimming through Solr's code base I noticed that 
> DistributedUpdateProcessor has a lot of nested if else statements, which 
> hampers code readability.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to