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

CoreAdminHandler Unload no longer handles null core name.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.10, 5.0, 5.1, 5.2
    • Fix Version/s: 5.3, 6.0
    • Component/s: clients - java
    • Labels:
    • Environment:

      Windows 8 and Windows Server 2012 R2

      Description

      Pre 4.10 If a null core name was passed in it would be handled as a bad request with error message "No such core exists [ null ]". From 4.10 onwards an unload call goes to CoreContainer unload where the first action taken is removing the core from coreInitFailures which throws when given null and instead of returning the expected BadRequest "Cannot unload non-existent core [null]" it returns InternalServerError "java.lang.NullPointerException
      at java.util.concurrent.ConcurrentHashMap.replaceNode(Unknown Source)
      at java.util.concurrent.ConcurrentHashMap.remove(Unknown Source)
      at org.apache.solr.core.CoreContainer.unload(CoreContainer.java:661)..."

      This was found due to mixing up query parameter "name" used in create vs "core" in unload. As a result this is easily reproducible with http://localhost:8983/solr/admin/cores?action=UNLOAD&name=core0

      1. SOLR-7705.patch
        2 kB
        Edward Ribeiro
      2. SOLR-7705.2.patch
        2 kB
        Edward Ribeiro

        Activity

        Hide
        eribeiro Edward Ribeiro added a comment - - edited

        Hi, I have attached a patch. Please, let me know what you think.

        ps: the patch is against lucene_solr_5_0 since lucene_solr_4_10 involves some more changes, but I can backport it to 4.9 too if you feel like doing it.

        Cheers,
        Eddie

        Show
        eribeiro Edward Ribeiro added a comment - - edited Hi, I have attached a patch. Please, let me know what you think. ps: the patch is against lucene_solr_5_0 since lucene_solr_4_10 involves some more changes, but I can backport it to 4.9 too if you feel like doing it. Cheers, Eddie
        Hide
        eribeiro Edward Ribeiro added a comment -

        Attaching new version

        Show
        eribeiro Edward Ribeiro added a comment - Attaching new version
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1690424 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1690424 ]

        SOLR-7705: CoreAdminHandler Unload no longer handles null core name

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1690424 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1690424 ] SOLR-7705 : CoreAdminHandler Unload no longer handles null core name
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1690425 from shalin@apache.org in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1690425 ]

        SOLR-7705: CoreAdminHandler Unload no longer handles null core name

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1690425 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1690425 ] SOLR-7705 : CoreAdminHandler Unload no longer handles null core name
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Thanks John and Edward!

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Thanks John and Edward!
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            shalinmangar Shalin Shekhar Mangar
            Reporter:
            johncall John Call
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development