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

Ignore or throw proper error message for bad delete containing bad composite ID

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.0
    • 4.7, 6.0
    • SolrCloud
    • None
    • 5.0-SNAPSHOT 1480985:1559676M - markus - 2014-01-20 13:48:08

    Description

      The following error is thrown when sending deleteById via SolrJ with ID ending with an exclamation mark, it is also the case for deletes by id via the URL. For some curious reason delete by query using the id field does not fail, but i would expect the same behaviour.

      • fails: /solr/update?commit=true&stream.body=<delete><id>a!</id></delete>
      • ok: /solr/update?commit=true&stream.body=<delete><query>id:a!</query></delete>
      2014-01-22 15:32:48,826 ERROR [solr.core.SolrCore] - [http-8080-exec-5] - : java.lang.ArrayIndexOutOfBoundsException: 1
              at org.apache.solr.common.cloud.CompositeIdRouter$KeyParser.getHash(CompositeIdRouter.java:291)
              at org.apache.solr.common.cloud.CompositeIdRouter.sliceHash(CompositeIdRouter.java:58)
              at org.apache.solr.common.cloud.HashBasedRouter.getTargetSlice(HashBasedRouter.java:33)
              at org.apache.solr.update.processor.DistributedUpdateProcessor.setupRequest(DistributedUpdateProcessor.java:218)
              at org.apache.solr.update.processor.DistributedUpdateProcessor.processDelete(DistributedUpdateProcessor.java:961)
              at org.apache.solr.update.processor.UpdateRequestProcessor.processDelete(UpdateRequestProcessor.java:55)
              at org.apache.solr.handler.loader.XMLLoader.processDelete(XMLLoader.java:347)
              at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:278)
              at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:174)
              at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
              at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
              at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
              at org.apache.solr.core.SolrCore.execute(SolrCore.java:1915)
              at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:785)
              at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
              at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:203)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
              at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
              at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:744)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2282)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:724) 
      

      See also: http://lucene.472066.n3.nabble.com/AIOOBException-on-trunk-since-21st-or-22nd-build-td4112753.html

      Attachments

        1. SOLR-5659.patch
          3 kB
          Shalin Shekhar Mangar
        2. SOLR-5659.patch
          2 kB
          Anshum Gupta

        Activity

          People

            anshum Anshum Gupta
            markus17 Markus Jelsma
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: