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

Nullpointer-Exception when querying collection through collection alias

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.1
    • Fix Version/s: 8.1.1, 8.2, main (9.0)
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      I tried to upgrade from 8.0 to 8.1. I noticed that there is an issue with collection aliases, but I am not 100% sure it is due to the upgrade.
       
      Situation:
      I have a collection called c_testcollection. 
      I have an alias called testcollection.
      Alias "testcollection" points to "c_testcollection".
      On Solr 8.0 no issue to query the collection through its alias "testcollection", e.g http://localhost:8983/solr/testcollection/select?q=test
       
      After upgrade to Solr 8.1:
      When I do a query on c_testcollection then there is no issue:
      http://localhost:8983/solr/c_testcollection/select?q=test
      When I do a query on testcollection then I receive the stacktrace below
      http://localhost:8983/solr/testcollection/select?q=test
       
      Additionally I observe a strange behavior in the admin ui. When I try to create an alias (e.g. new) for a new collection (e.g. c_new) then it creates two aliases:
      new => c_new
      c_new => c_new
      if i then do a query on the alias new it works without issues. If I remove the alias from c_new to c_new then I get the same error. Is this desired behaviour?
      It is rather annoying to have unnecessary aliases, because I need to filter them out in my application when retrieving all aliases.
      Is there a related issue.
       
      Here the stacktrace:
      {
        "error":{
          "trace":"java.lang.NullPointerException\n\tat java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:351)\n\tat org.apache.solr.common.cloud.Aliases.resolveAliasesGivenAliasMap(Aliases.java:258)\n\tat org.apache.solr.common.cloud.Aliases.resolveAliases(Aliases.java:181)\n\tat org.apache.solr.servlet.HttpSolrCall.resolveCollectionListOrAlias(HttpSolrCall.java:385)\n\tat org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:273)\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:486)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:397)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:343)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:502)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)\n\tat org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:305)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:132)\n\tat org.eclipse.jetty.http2.HTTP2Connection.produce(HTTP2Connection.java:171)\n\tat org.eclipse.jetty.http2.HTTP2Connection.onFillable(HTTP2Connection.java:126)\n\tat org.eclipse.jetty.http2.HTTP2Connection$FillableCallback.succeeded(HTTP2Connection.java:338)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:411)\n\tat org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:305)\n\tat org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:159)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)\n\tat java.base/java.lang.Thread.run(Thread.java:834)\n",
          "code":500}}
       

        Attachments

        1. SOLR-13475.patch
          10 kB
          Andrzej Bialecki
        2. SOLR-13475.patch
          9 kB
          Andrzej Bialecki

          Activity

            People

            • Assignee:
              ab Andrzej Bialecki
              Reporter:
              jornfranke Jörn Franke
            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: