You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/10/26 08:59:00 UTC

[jira] [Commented] (SOLR-17054) Remove unused and duplicate code in DistributedZkUpdateProcessor

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

ASF subversion and git services commented on SOLR-17054:
--------------------------------------------------------

Commit 959029c7e7e2d03dec054d9094918d78a7a35c1a in solr's branch refs/heads/main from Vincent P
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=959029c7e7e ]

SOLR-17054: Remove unused and duplicate code in DistributedZkUpdateProcessor (#2038)

Co-authored-by: Vincent Primault <vp...@salesforce.com>

> Remove unused and duplicate code in DistributedZkUpdateProcessor
> ----------------------------------------------------------------
>
>                 Key: SOLR-17054
>                 URL: https://issues.apache.org/jira/browse/SOLR-17054
>             Project: Solr
>          Issue Type: Task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Vincent Primault
>            Assignee: Bruno Roustant
>            Priority: Major
>             Fix For: main (10.0)
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> There is dead code and duplicate code in DistributedZkUpdateProcessor. It makes understanding this already complex class more difficult.
> In particular, in getCollectionUrls, there are some unused parameters which make the method more complex than it should be. Because it looked a bit suspicious, [~broustant] investigated and found it was indeed safe to delete:
> {quote}I looked at the git history.
> This code comes from a refactor in 2019 of DistributedUpdateProcessor to extract the code specific to cloud. At that time this method signature already contained the boolean.
> Looking earlier, I saw that the boolean was added in 2018 in a commit “Make massive improvements to the tests”. It added the boolean and modified the single call to pass true. Well, I believe it was a perf optimization to always limit to leaders. At that time the intent was clearly to ignore the dead code, and I think the dead code should have been removed from the method instead of adding this boolean.
> So after looking at the context, I’m +1 to remove this dead code.
> {quote}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org