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

Clear root Entity cache when entity is processed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.4.1
    • None
    • None
    • Linux, JDBC, Postgres 8.4.6

    Description

      The current process clears the entity caches once all root entity elements have been imported. When a config file has dozens of root entities, the result is one "idle in transaction" process for each entity processed, effectively eating up the databases available connections. The simple solution would be to clear a root entity's cache once that entity has been processed.

      The following is a diff that I used in my instance to clear the cache when the entity completed:

      — DocBuilder.java 2011-01-12 10:05:58.000000000 -0700
      +++ DocBuilder.java.new 2011-01-12 10:05:31.000000000 -0700
      @@ -435,6 +435,9 @@
      writer.log(SolrWriter.END_ENTITY, null, null);
      }
      entityProcessor.destroy();
      + if(entity.isDocRoot)

      { + entity.clearCache(); + }

      }
      }

      Attachments

        Issue Links

          Activity

            People

              arafalov Alexandre Rafalovitch
              thrykol Shane
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: