Solr
  1. Solr
  2. SOLR-6880

ZKStateReader makes a call to updateWatchedCollection, which doesn't accept null with a method creating the argument that can return null.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      I've seen the resulting NPE in tests.

      1. SOLR-6880.patch
        3 kB
        Shalin Shekhar Mangar
      2. SOLR-6880.patch
        0.7 kB
        Mark Miller

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Yes, I just noticed this as well while debugging test failures for SOLR-4839

        Show
        Shalin Shekhar Mangar added a comment - Yes, I just noticed this as well while debugging test failures for SOLR-4839
        Hide
        Shalin Shekhar Mangar added a comment -

        I found a few more places where getCollectionLive was being used and added asserts and null checks.

        Show
        Shalin Shekhar Mangar added a comment - I found a few more places where getCollectionLive was being used and added asserts and null checks.
        Hide
        ASF subversion and git services added a comment -

        Commit 1649945 from Mark Miller in branch 'dev/trunk'
        [ https://svn.apache.org/r1649945 ]

        SOLR-6880: Harden ZkStateReader to expect that getCollectionLive may return null as it's contract states.

        Show
        ASF subversion and git services added a comment - Commit 1649945 from Mark Miller in branch 'dev/trunk' [ https://svn.apache.org/r1649945 ] SOLR-6880 : Harden ZkStateReader to expect that getCollectionLive may return null as it's contract states.
        Hide
        ASF subversion and git services added a comment -

        Commit 1649949 from Mark Miller in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1649949 ]

        SOLR-6880: Harden ZkStateReader to expect that getCollectionLive may return null as it's contract states.

        Show
        ASF subversion and git services added a comment - Commit 1649949 from Mark Miller in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1649949 ] SOLR-6880 : Harden ZkStateReader to expect that getCollectionLive may return null as it's contract states.
        Hide
        Mark Miller added a comment -

        Thanks Shalin!

        Show
        Mark Miller added a comment - Thanks Shalin!
        Hide
        Mark Miller added a comment -

        Hey Shalin Shekhar Mangar, it seems that the assert you added in updateClusterState can be tripped in CollectionsAPIDistributedZkTest.

        Error from server at http://127.0.0.1:40942: Expected mime type application/octet-stream but got text/html. <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 500 {trace=java.lang.AssertionError  at org.apache.solr.common.cloud.ZkStateReader.updateClusterState(ZkStateReader.java:532)  at org.apache.solr.common.cloud.ZkStateReader.updateClusterState(ZkStateReader.java:255)  at org.apache.solr.common.cloud.ZkStateReader.removeZKWatch(ZkStateReader.java:900)  at org.apache.solr.cloud.ZkController.unregister(ZkController.java:1218)  at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:590)  at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:199)  at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:188)  at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:144)  at 
        
        Show
        Mark Miller added a comment - Hey Shalin Shekhar Mangar , it seems that the assert you added in updateClusterState can be tripped in CollectionsAPIDistributedZkTest. Error from server at http://127.0.0.1:40942: Expected mime type application/octet-stream but got text/html. <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 500 {trace=java.lang.AssertionError at org.apache.solr.common.cloud.ZkStateReader.updateClusterState(ZkStateReader.java:532) at org.apache.solr.common.cloud.ZkStateReader.updateClusterState(ZkStateReader.java:255) at org.apache.solr.common.cloud.ZkStateReader.removeZKWatch(ZkStateReader.java:900) at org.apache.solr.cloud.ZkController.unregister(ZkController.java:1218) at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:590) at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:199) at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:188) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:144) at
        Hide
        ASF subversion and git services added a comment -

        Commit 1651394 from Mark Miller in branch 'dev/trunk'
        [ https://svn.apache.org/r1651394 ]

        SOLR-6880: Remove this assert that can fail various tests.

        Show
        ASF subversion and git services added a comment - Commit 1651394 from Mark Miller in branch 'dev/trunk' [ https://svn.apache.org/r1651394 ] SOLR-6880 : Remove this assert that can fail various tests.
        Hide
        ASF subversion and git services added a comment -

        Commit 1651395 from Mark Miller in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1651395 ]

        SOLR-6880: Remove this assert that can fail various tests.

        Show
        ASF subversion and git services added a comment - Commit 1651395 from Mark Miller in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1651395 ] SOLR-6880 : Remove this assert that can fail various tests.
        Hide
        Mark Miller added a comment -

        That assert was also rarely affecting other tests and making them fail.

        Show
        Mark Miller added a comment - That assert was also rarely affecting other tests and making them fail.
        Hide
        ASF subversion and git services added a comment -

        Commit 1656090 from Mark Miller in branch 'dev/trunk'
        [ https://svn.apache.org/r1656090 ]

        SOLR-6880: Remove this assert that can fail tests.

        Show
        ASF subversion and git services added a comment - Commit 1656090 from Mark Miller in branch 'dev/trunk' [ https://svn.apache.org/r1656090 ] SOLR-6880 : Remove this assert that can fail tests.
        Hide
        ASF subversion and git services added a comment -

        Commit 1656091 from Mark Miller in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1656091 ]

        SOLR-6880: Remove this assert that can fail tests.

        Show
        ASF subversion and git services added a comment - Commit 1656091 from Mark Miller in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1656091 ] SOLR-6880 : Remove this assert that can fail tests.
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Mark Miller
            Reporter:
            Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development