You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mikhail Khludnev (Updated) (JIRA)" <ji...@apache.org> on 2011/12/04 20:58:39 UTC

[jira] [Updated] (SOLR-2947) DIH caching bug - EntityRunner destroys child entity processor

     [ https://issues.apache.org/jira/browse/SOLR-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Khludnev updated SOLR-2947:
-----------------------------------

    Attachment: dih-cache-destroy-on-threads-fix.patch
                dih-cache-threads-enabling-bug.patch

To reproduce the issue just insert single line in test config by applying dih-cache-threads-enabling-bug.patch. It curiously breaks TestEphemeralCache. 

DocBuilder.doFullDump() considers request as dataImporter.getConfig().isMultiThreaded even the single thread is specified (DataImporter.initEntity() too straightforward). But it forces DocBuilder to choose EntityRunner branch instead of  buildDocument(). 

EntityRunner destroys entity processor (and cleanups the cache) per every run() call, but for child entity the run() is called many times - once per parent. As result the only first child is indexed, and it fails the test.
You can fix it by commenting entityProcessor destroying in EntityRunner.run() at the finally section. But you lose cache releasing at all.
dih-cache-destroy-on-threads-fix.patch fixes entityProcessors destroying and cover it by slightly amended TestEphemeralCache
                
> DIH caching bug - EntityRunner destroys child entity processor
> --------------------------------------------------------------
>
>                 Key: SOLR-2947
>                 URL: https://issues.apache.org/jira/browse/SOLR-2947
>             Project: Solr
>          Issue Type: Sub-task
>          Components: contrib - DataImportHandler
>    Affects Versions: 4.0
>            Reporter: Mikhail Khludnev
>              Labels: noob
>             Fix For: 4.0
>
>         Attachments: dih-cache-destroy-on-threads-fix.patch, dih-cache-threads-enabling-bug.patch
>
>
> [line 473 entityProcessor.destroy();|http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java?revision=1201659&view=markup] breaks children entity.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org