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

'deletereplica' can throw a NullPointerException

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.9
    • 4.10, 5.0
    • SolrCloud
    • None

    Description

      Occasionally, but not always, when I invoke DELETEREPLICA I get a NPE. I suspect it is a race condition when the core finishes deleting while the overseer is checking for it?

      Client response:
      curl "http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection=mycollection&shard=tmp_shard&replica=core_node1"
      <?xml version="1.0" encoding="UTF-8"?>
      <response>
      <lst name="responseHeader"><int name="status">500</int><int name="QTime">3712</int></lst><lst name="success"><lst><lst name="responseHeader"><int name="status">0</int><int name="QTime">27</int></lst></lst></lst><str name="Operation deletereplica caused exception:">java.lang.NullPointerException:java.lang.NullPointerException</str><lst name="exception"><null name="msg"/><int name="rspCode">-1</int></lst><lst name="error"><str name="trace">org.apache.solr.common.SolrException
      at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:364)
      at org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:320)
      at org.apache.solr.handler.admin.CollectionsHandler.handleRemoveReplica(CollectionsHandler.java:494)
      at org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:184)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:729)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:267)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:368)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
      at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      at java.lang.Thread.run(Thread.java:744)
      </str><int name="code">500</int></lst>
      </response>

      Server log:
      21:06:05.368 [OverseerThreadFactory-6-thread-5] WARN o.a.s.c.OverseerCollectionProcessor - OverseerCollectionProcessor.processMessage : deletereplica ,

      { "operation":"deletereplica", "collection":"mycollection", "shard":"tmp_shard", "replica":"core_node1"}

      21:06:05.602 [OverseerThreadFactory-6-thread-5] ERROR o.a.s.c.OverseerCollectionProcessor - Collection deletereplica of deletereplica failed:java.lang.NullPointerException
      at org.apache.solr.cloud.OverseerCollectionProcessor.waitForCoreNodeGone(OverseerCollectionProcessor.java:911)
      at org.apache.solr.cloud.OverseerCollectionProcessor.deleteReplica(OverseerCollectionProcessor.java:899)
      at org.apache.solr.cloud.OverseerCollectionProcessor.processMessage(OverseerCollectionProcessor.java:573)
      at org.apache.solr.cloud.OverseerCollectionProcessor$Runner.run(OverseerCollectionProcessor.java:2619)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:744)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            anshum Anshum Gupta
            ralph.tice Ralph Tice
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment