Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9241 Rebalance API for SolrCloud
  3. SOLR-9319

DELETEREPLICA should be able to accept just count and remove replicas intelligenty

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.3, master (7.0)
    • Component/s: SolrCloud
    • Labels:
      None
    1. Delete_Replica_count_1.jpg
      318 kB
      Nitin Sharma
    2. Delete_replica_count2.jpg
      424 kB
      Nitin Sharma
    3. Delete_Replica_invalid.jpg
      418 kB
      Nitin Sharma
    4. Delete_Replica_with_only_1replica.jpg
      394 kB
      Nitin Sharma
    5. DeleteReplicaPatch.jpg
      383 kB
      Nitin Sharma
    6. Delte_replica_after.jpg
      215 kB
      Nitin Sharma
    7. Delte_replica_before.jpg
      180 kB
      Nitin Sharma
    8. Old_deletereplica_api_works.jpg
      256 kB
      Nitin Sharma
    9. Screen Shot 2016-08-26 at 12.59.16 PM.png
      70 kB
      Noble Paul
    10. SOLR-9310.patch
      3 kB
      Noble Paul
    11. SOLR-9319.patch
      21 kB
      Nitin Sharma
    12. SOLR-9319.patch
      19 kB
      Nitin Sharma
    13. SOLR-9319.patch
      19 kB
      Nitin Sharma
    14. SOLR-9319.patch
      13 kB
      Nitin Sharma

      Issue Links

        Activity

        Hide
        shaie Shai Erera added a comment -

        What does "just count" mean? Will I not be able to delete a specific replica, or is this in addition to being able to delete a selected replica? I think that having an API like "delete replicas such that only X remain" is fine, but I would like to also be able to specify which replica I want to delete (since in my case I need to control that).

        Show
        shaie Shai Erera added a comment - What does "just count" mean? Will I not be able to delete a specific replica, or is this in addition to being able to delete a selected replica? I think that having an API like "delete replicas such that only X remain" is fine, but I would like to also be able to specify which replica I want to delete (since in my case I need to control that).
        Hide
        noble.paul Noble Paul added a comment -

        The command would take the following parameters

        • count: no:of replicas to be removed
        • collection : (required) The collection name
        • shard : (optional) . If shard is absent, 'count' no:of replicas from each shard will be removed
        Show
        noble.paul Noble Paul added a comment - The command would take the following parameters count: no:of replicas to be removed collection : (required) The collection name shard : (optional) . If shard is absent, 'count' no:of replicas from each shard will be removed
        Hide
        noble.paul Noble Paul added a comment - - edited

        The old functionality continues to be there. This kicks in when 'count' is specified as a parameter

        Show
        noble.paul Noble Paul added a comment - - edited The old functionality continues to be there. This kicks in when 'count' is specified as a parameter
        Hide
        shaie Shai Erera added a comment -

        Thanks Noble Paul. The issue description is a bit misleading (should accept just count) but thanks for clarifying.

        Show
        shaie Shai Erera added a comment - Thanks Noble Paul . The issue description is a bit misleading ( should accept just count ) but thanks for clarifying.
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Noble Paul When you mean intelligently, I am assuming the following

        1) If it is the only replica it would not get deleted.
        2) If there are multiple replicas, then it will remove the replica that is not the leader (to lessen operations in the cluster)

        Let me know if there is anything else that is needed. I am testing out patch for this as we speak.

        Show
        nitin.sharma Nitin Sharma added a comment - Noble Paul When you mean intelligently, I am assuming the following 1) If it is the only replica it would not get deleted. 2) If there are multiple replicas, then it will remove the replica that is not the leader (to lessen operations in the cluster) Let me know if there is anything else that is needed. I am testing out patch for this as we speak.
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Screenshots with
        a) API with Count param and intelligent removal
        b) API with count and only 1 replica remaining
        c) API with count and more replicas are requested than present
        d) Old API call without count param working as expected

        Show
        nitin.sharma Nitin Sharma added a comment - Screenshots with a) API with Count param and intelligent removal b) API with count and only 1 replica remaining c) API with count and more replicas are requested than present d) Old API call without count param working as expected
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Noble Paul Please let me know if this is missing anything

        Show
        nitin.sharma Nitin Sharma added a comment - Noble Paul Please let me know if this is missing anything
        Hide
        noble.paul Noble Paul added a comment -

        Looks mostly fine. Can you add a test case?

        Show
        noble.paul Noble Paul added a comment - Looks mostly fine. Can you add a test case?
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Sure. Let me try that out.

        Show
        nitin.sharma Nitin Sharma added a comment - Sure. Let me try that out.
        Hide
        nitin.sharma Nitin Sharma added a comment - - edited

        With Tests. Ran ant test with full suite and the ant test with -Dtestcase=DeleteReplicaTest to verify all passed.

        Show
        nitin.sharma Nitin Sharma added a comment - - edited With Tests. Ran ant test with full suite and the ant test with -Dtestcase=DeleteReplicaTest to verify all passed.
        Hide
        noble.paul Noble Paul added a comment -

        Can you just update the patch to the current trunk

        Show
        noble.paul Noble Paul added a comment - Can you just update the patch to the current trunk
        Hide
        nitin.sharma Nitin Sharma added a comment -

        It is already rebased on top of current master. Did you mean commit to trunk?

        Show
        nitin.sharma Nitin Sharma added a comment - It is already rebased on top of current master. Did you mean commit to trunk?
        Hide
        noble.paul Noble Paul added a comment -

        I refactored everything out from OverseerCollectionMessageHandler I don't think this applies to the trunk after that

        Show
        noble.paul Noble Paul added a comment - I refactored everything out from OverseerCollectionMessageHandler I don't think this applies to the trunk after that
        Hide
        noble.paul Noble Paul added a comment -

        further optimized cache

        Show
        noble.paul Noble Paul added a comment - further optimized cache
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Ok i will rebase on master again. BTW i think you uploaded the patch for 9310 here.

        Show
        nitin.sharma Nitin Sharma added a comment - Ok i will rebase on master again. BTW i think you uploaded the patch for 9310 here.
        Hide
        nitin.sharma Nitin Sharma added a comment - - edited

        Noble Paul Rebased on master. Ran E2e Tests and unit tests.

        Show
        nitin.sharma Nitin Sharma added a comment - - edited Noble Paul Rebased on master. Ran E2e Tests and unit tests.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user nitingithub opened a pull request:

        https://github.com/apache/lucene-solr/pull/70

        DELETEREPLICA should be able to accept just count and remove replicas intelligently

        DELETEREPLICA should be able to accept just count and remove replicas intelligently
        SOLR-9319

        More details: https://issues.apache.org/jira/browse/SOLR-9319

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/nitingithub/lucene-solr master

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/lucene-solr/pull/70.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #70


        commit 332e447f085e779e4b56ab0617bf095385e5ffae
        Author: Nitin Sharma <nitin.sharma@bloomreach.com>
        Date: 2016-08-23T02:44:39Z

        DELETEREPLICA should be able to accept just count and remove replicas intelligenty
        SOLR-9319


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user nitingithub opened a pull request: https://github.com/apache/lucene-solr/pull/70 DELETEREPLICA should be able to accept just count and remove replicas intelligently DELETEREPLICA should be able to accept just count and remove replicas intelligently SOLR-9319 More details: https://issues.apache.org/jira/browse/SOLR-9319 You can merge this pull request into a Git repository by running: $ git pull https://github.com/nitingithub/lucene-solr master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/70.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #70 commit 332e447f085e779e4b56ab0617bf095385e5ffae Author: Nitin Sharma <nitin.sharma@bloomreach.com> Date: 2016-08-23T02:44:39Z DELETEREPLICA should be able to accept just count and remove replicas intelligenty SOLR-9319
        Hide
        noble.paul Noble Paul added a comment -

        The testcases could use the async option. The rest look fine

        Show
        noble.paul Noble Paul added a comment - The testcases could use the async option. The rest look fine
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user nitingithub closed the pull request at:

        https://github.com/apache/lucene-solr/pull/70

        Show
        githubbot ASF GitHub Bot added a comment - Github user nitingithub closed the pull request at: https://github.com/apache/lucene-solr/pull/70
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user nitingithub opened a pull request:

        https://github.com/apache/lucene-solr/pull/72

        SOLR-9319 - DELETEREPLICA should be able to accept just count and remove replicas intelligently

        Added functionality and one test in async mode and other in sync mode

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/nitingithub/lucene-solr master

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/lucene-solr/pull/72.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #72


        commit 332e447f085e779e4b56ab0617bf095385e5ffae
        Author: Nitin Sharma <nitin.sharma@bloomreach.com>
        Date: 2016-08-23T02:44:39Z

        DELETEREPLICA should be able to accept just count and remove replicas intelligenty
        SOLR-9319

        commit 6cb119d12915d486eb40b63887d6a83abe08a523
        Author: Nitin Sharma <nitin.sharma@bloomreach.com>
        Date: 2016-08-25T22:00:21Z

        Adding one more test in async mode

        commit c2a1855d305cd61e57f6b07a35395bb11463fa9c
        Author: Nitin Sharma <nitin.sharma@bloomreach.com>
        Date: 2016-08-25T22:02:13Z

        Adding one more test in async mode


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user nitingithub opened a pull request: https://github.com/apache/lucene-solr/pull/72 SOLR-9319 - DELETEREPLICA should be able to accept just count and remove replicas intelligently Added functionality and one test in async mode and other in sync mode You can merge this pull request into a Git repository by running: $ git pull https://github.com/nitingithub/lucene-solr master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/72.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #72 commit 332e447f085e779e4b56ab0617bf095385e5ffae Author: Nitin Sharma <nitin.sharma@bloomreach.com> Date: 2016-08-23T02:44:39Z DELETEREPLICA should be able to accept just count and remove replicas intelligenty SOLR-9319 commit 6cb119d12915d486eb40b63887d6a83abe08a523 Author: Nitin Sharma <nitin.sharma@bloomreach.com> Date: 2016-08-25T22:00:21Z Adding one more test in async mode commit c2a1855d305cd61e57f6b07a35395bb11463fa9c Author: Nitin Sharma <nitin.sharma@bloomreach.com> Date: 2016-08-25T22:02:13Z Adding one more test in async mode
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Noble Paul Added one test in async mode and the other in sync mode. Closed the old pull request #70. Raised a new one #72.

        Show
        nitin.sharma Nitin Sharma added a comment - Noble Paul Added one test in async mode and the other in sync mode. Closed the old pull request #70. Raised a new one #72.
        Hide
        noble.paul Noble Paul added a comment -

        Can you post a .patch file. I git a bizarre patch when I download from github

        Show
        noble.paul Noble Paul added a comment - Can you post a .patch file. I git a bizarre patch when I download from github
        Hide
        noble.paul Noble Paul added a comment -

        look at the multiple Test files

        Show
        noble.paul Noble Paul added a comment - look at the multiple Test files
        Hide
        varunthacker Varun Thacker added a comment -

        Hi Noble,

        I think if you put a ".patch" after the pull request URL you get the actual patch : https://github.com/apache/lucene-solr/pull/72.patch

        Show
        varunthacker Varun Thacker added a comment - Hi Noble, I think if you put a ".patch" after the pull request URL you get the actual patch : https://github.com/apache/lucene-solr/pull/72.patch
        Hide
        noble.paul Noble Paul added a comment -

        I know that . If you want to know the problem look at the screenshot I have osted

        Show
        noble.paul Noble Paul added a comment - I know that . If you want to know the problem look at the screenshot I have osted
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Updated patch

        Show
        nitin.sharma Nitin Sharma added a comment - Updated patch
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Noble Paul Any updates to the patch needed?

        Show
        nitin.sharma Nitin Sharma added a comment - Noble Paul Any updates to the patch needed?
        Hide
        noble.paul Noble Paul added a comment -

        don't think so. Will review more and commit it after SOLR-9461

        Show
        noble.paul Noble Paul added a comment - don't think so. Will review more and commit it after SOLR-9461
        Hide
        nitin.sharma Nitin Sharma added a comment -

        Thanks!

        Show
        nitin.sharma Nitin Sharma added a comment - Thanks!
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit e203c9af95461216d9ff39a108c86c5ce4308f5f in lucene-solr's branch refs/heads/master from Noble Paul
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e203c9a ]

        SOLR-9319: DELETEREPLICA can accept a 'count' and remove appropriate replicas

        Show
        jira-bot ASF subversion and git services added a comment - Commit e203c9af95461216d9ff39a108c86c5ce4308f5f in lucene-solr's branch refs/heads/master from Noble Paul [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e203c9a ] SOLR-9319 : DELETEREPLICA can accept a 'count' and remove appropriate replicas
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 4b8f574418770f6872b7d3cbfca6bc028a910426 in lucene-solr's branch refs/heads/branch_6x from Noble Paul
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4b8f574 ]

        SOLR-9319: DELETEREPLICA can accept a 'count' and remove appropriate replicas

        Show
        jira-bot ASF subversion and git services added a comment - Commit 4b8f574418770f6872b7d3cbfca6bc028a910426 in lucene-solr's branch refs/heads/branch_6x from Noble Paul [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4b8f574 ] SOLR-9319 : DELETEREPLICA can accept a 'count' and remove appropriate replicas
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1a78ab621ff24e9d31d6f6e80c8771012ceac2d7 in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1a78ab6 ]

        SOLR-9319: Move to the right section in CHANGES.txt

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1a78ab621ff24e9d31d6f6e80c8771012ceac2d7 in lucene-solr's branch refs/heads/master from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1a78ab6 ] SOLR-9319 : Move to the right section in CHANGES.txt
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit b5f5bb10aca8b6fd7cf4445ca1e2adee9c7a2ad4 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b5f5bb1 ]

        SOLR-9319: Move to the right section in CHANGES.txt

        (cherry picked from commit 1a78ab6)

        Show
        jira-bot ASF subversion and git services added a comment - Commit b5f5bb10aca8b6fd7cf4445ca1e2adee9c7a2ad4 in lucene-solr's branch refs/heads/branch_6x from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=b5f5bb1 ] SOLR-9319 : Move to the right section in CHANGES.txt (cherry picked from commit 1a78ab6)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 11a98a89fd63271f969ae1072159c410ad6417cc in lucene-solr's branch refs/heads/branch_6x from Alan Woodward
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=11a98a8 ]

        SOLR-9132: Cut over DeleteReplica tests

        Also fixes some bugs in CollectionAdminRequest.DeleteReplica from SOLR-9319

        Show
        jira-bot ASF subversion and git services added a comment - Commit 11a98a89fd63271f969ae1072159c410ad6417cc in lucene-solr's branch refs/heads/branch_6x from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=11a98a8 ] SOLR-9132 : Cut over DeleteReplica tests Also fixes some bugs in CollectionAdminRequest.DeleteReplica from SOLR-9319
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit be4233cb567a8e65ef67d0fc1c8e47936e155a23 in lucene-solr's branch refs/heads/master from Alan Woodward
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=be4233c ]

        SOLR-9132: Cut over DeleteReplica tests

        Also fixes some bugs in CollectionAdminRequest.DeleteReplica from SOLR-9319

        Show
        jira-bot ASF subversion and git services added a comment - Commit be4233cb567a8e65ef67d0fc1c8e47936e155a23 in lucene-solr's branch refs/heads/master from Alan Woodward [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=be4233c ] SOLR-9132 : Cut over DeleteReplica tests Also fixes some bugs in CollectionAdminRequest.DeleteReplica from SOLR-9319

          People

          • Assignee:
            noble.paul Noble Paul
            Reporter:
            noble.paul Noble Paul
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development