1. Solr
  2. SOLR-5418

Background merge after field removed from solr.xml causes error


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.6, Trunk
    • Component/s: Schema and Analysis
    • Labels:


      Problem from the user's list, cut/pasted below. Robert Muir hacked out a quick patch he pasted on the dev list, I'll append it shortly.

      I am working at implementing solr to work as the search backend for our web
      system. So far things have been going well, but today I made some schema
      changes and now things have broken.

      I updated the schema.xml file and reloaded the core (via the admin
      interface). No errors were reported in the logs.

      I then pushed 100 records to be indexed. A call to Commit afterwards
      seemed fine, however my next call for Optimize caused the following errors: background merge hit exception:
      _2n(4.4):C4263/154 _30(4.4):C134 _32(4.4):C10 _31(4.4):C10 into _37
      [maxNumSegments=1] background merge hit exception:
      _2n(4.4):C4263/154 _30(4.4):C134 _32(4.4):C10 _31(4.4):C10 into _37

      Unfortunately, googling for background merge hit exception came up
      with 2 thing: a corrupt index or not enough free space. The host
      machine that's hosting solr has 227 out of 229GB free (according to df
      -h), so that's not it.

      I then ran CheckIndex on the index, and got the following results:

      As someone who is new to solr and lucene, as far as I can tell this
      means my index is fine. So I am coming up at a loss. I'm somewhat sure
      that I could probably delete my data directory and rebuild it but I am
      more interested in finding out why is it having issues, what is the
      best way to fix it, and what is the best way to prevent it from
      happening when this goes into production.

      Does anyone have any advice that may help?

      I helped Matthew find the logs and he posted this stack trace:

      1691103929 [http-bio-8080-exec-3] INFO org.apache.solr.update.UpdateHandler â start commit


      1691104153 [http-bio-8080-exec-3] INFO org.apache.solr.update.processor.LogUpdateProcessor â [dbqItems] webapp=/solr path=/update params=


      {} 0 224
      1691104154 [http-bio-8080-exec-3] ERROR org.apache.solr.core.SolrCore â background merge hit exception: _2n(4.4):C4263/154 _30(4.4):C134 _32(4.4):C10 _31(4.4):C10 into _39 [maxNumSegments=1]
      at org.apache.lucene.index.IndexWriter.forceMerge(
      at org.apache.lucene.index.IndexWriter.forceMerge(
      at org.apache.solr.update.DirectUpdateHandler2.commit(
      at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(
      at org.apache.solr.update.processor.UpdateRequestProcessor.processCommit(
      at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalCommit(
      at org.apache.solr.update.processor.DistributedUpdateProcessor.processCommit(
      at org.apache.solr.update.processor.LogUpdateProcessor.processCommit(
      at org.apache.solr.handler.RequestHandlerUtils.handleCommit(
      at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(
      at org.apache.solr.core.SolrCore.execute(
      at org.apache.solr.servlet.SolrDispatchFilter.execute(
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(
      at org.apache.catalina.core.StandardWrapperValve.invoke(
      at org.apache.catalina.core.StandardContextValve.invoke(
      at org.apache.catalina.core.StandardHostValve.invoke(
      at org.apache.catalina.valves.ErrorReportValve.invoke(
      at org.apache.catalina.valves.AccessLogValve.invoke(
      at org.apache.catalina.core.StandardEngineValve.invoke(
      at org.apache.catalina.connector.CoyoteAdapter.service(
      at org.apache.coyote.http11.AbstractHttp11Processor.process(
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
      at java.util.concurrent.ThreadPoolExecutor.runWorker(
      at java.util.concurrent.ThreadPoolExecutor$
      Caused by: java.lang.IllegalArgumentException: no such field what
      at org.apache.solr.core.SchemaCodecFactory$1.getPostingsFormatForField(
      at org.apache.lucene.codecs.lucene42.Lucene42Codec$1.getPostingsFormatForField(
      at org.apache.lucene.codecs.perfield.PerFieldPostingsFormat$FieldsWriter.addField(
      at org.apache.lucene.codecs.FieldsConsumer.merge(
      at org.apache.lucene.index.SegmentMerger.mergeTerms(
      at org.apache.lucene.index.SegmentMerger.merge(
      at org.apache.lucene.index.IndexWriter.mergeMiddle(
      at org.apache.lucene.index.IndexWriter.merge(
      at org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(
      at org.apache.lucene.index.ConcurrentMergeScheduler$

      1. SOLR-5418.patch
        11 kB
        Erick Erickson
      2. SOLR-5418.patch
        10 kB
        Erick Erickson
      3. SOLR-5418.patch
        3 kB
        Robert Muir
      4. SOLR-5418.patch
        3 kB
        Erick Erickson


        No work has yet been logged on this issue.


          • Assignee:
            Erick Erickson
            Erick Erickson
          • Votes:
            0 Vote for this issue
            2 Start watching this issue


            • Created: