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

Importing Delta create a memory leak

    XMLWordPrintableJSON

Details

    Description

      The org.apache.solr.handler.dataimport.SolrWriter is not correctly cleaning itself after finishing importing Deltas as the "Set<Object> deltaKeys" is not being cleaned after the process has finished.

      When using a custom importer or DataSource for my case I need to add additional parameters to the delta keys.

      When the data import finishes the DeltaKeys is not set back to null and the DataImporter, DocBuilder and the SolrWriter are mantained as live objects because there are being referenced by the "infoRegistry" of the SolrCore which seems to be used for Jmx information.

      It appears that starting a second delta import did not freed the memory which may cause on the long run an OutOfMemory, I have not checked if starting a full import would break the references and free the memory.

      An easy fix is possible which would be to add to the SolrWriter "deltaKeys = null;" on the close method.
      Or nullify the writer on DocBuilder after being used on the method execute();

      Attachments

        Activity

          People

            shalin Shalin Shekhar Mangar
            Altaflux Pablo Lozano
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: