Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9455

Deleting a sub-shard in recovery state can mark parent shard as inactive

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.10.4, 5.5.2, 6.2
    • Fix Version/s: 6.2.1, 6.3, 7.0
    • Component/s: SolrCloud
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      When deleting a sub-shard after a failed split operation, the delete shard API unloads the replica cores and then deletes the shard state. But, say there were 2 replicas, if the following sequence occurs:

      1. 1st replica got deleted
      2. for any reason, the other replica published "state=active"

      Then the overseer can switch slice states and put parent shard as inactive and the sub-shards as active.

      We should defensively update sub-shard state back to "construction" and only then invoke the unload action on replica cores.

      1. SOLR-9455.patch
        2 kB
        Shalin Shekhar Mangar

        Issue Links

          Activity

          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          DeleteShardCmd now updates shard state to "construction" if it was in "recovery".

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - DeleteShardCmd now updates shard state to "construction" if it was in "recovery".
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2700b952119feb2d53a163d3374f56c85a0de339 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=2700b95 ]

          SOLR-9455: Deleting a sub-shard in recovery state can mark parent shard as inactive

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2700b952119feb2d53a163d3374f56c85a0de339 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=2700b95 ] SOLR-9455 : Deleting a sub-shard in recovery state can mark parent shard as inactive
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 937439a7a92beb0a0591f179dc4127b57c69eaa3 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=937439a ]

          SOLR-9455: Deleting a sub-shard in recovery state can mark parent shard as inactive
          (cherry picked from commit 2700b95)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 937439a7a92beb0a0591f179dc4127b57c69eaa3 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=937439a ] SOLR-9455 : Deleting a sub-shard in recovery state can mark parent shard as inactive (cherry picked from commit 2700b95)
          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Re-opened to back-port to 6.2.1

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Re-opened to back-port to 6.2.1
          Hide
          jira-bot ASF subversion and git services added a comment -

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

          SOLR-9455: Deleting a sub-shard in recovery state can mark parent shard as inactive
          (cherry picked from commit 2700b95)

          (cherry picked from commit 937439a)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2e2ef4738cdfbb96a9502920c4ae2ea388be509b in lucene-solr's branch refs/heads/branch_6_2 from Shalin Shekhar Mangar [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=2e2ef47 ] SOLR-9455 : Deleting a sub-shard in recovery state can mark parent shard as inactive (cherry picked from commit 2700b95) (cherry picked from commit 937439a)
          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Closing after 6.2.1 release

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Closing after 6.2.1 release

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              shalinmangar Shalin Shekhar Mangar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development