Hi,
I have 2 DataImportHandlers configured. The first one prepares data to
berkeley backed cache (SOLR-2382, SOLR-2613) and the second one then
indexes documents reading subentity data from the cache.
I need some way to prevent the second handler to run if the first one is
currently runnig to prevent reading any inconsistent data. I have't
found any clear way to achieve this yet.
I thought I can use EventListener before the second handler that will
check whether the cache dataimport is running and if so set some flag,
that the processing should not continue.
Or is there another way to block data import handler when another one is
running?
in solrconfig.xml I have:
<requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">db-data-config.xml</str>
<str name="persistCacheBaseDir">...</str>
</lst>
</requestHandler>
<requestHandler name="/dih-cache"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">cache-db-data-config.xml</str>
<str name="writerImpl">
org.apache.solr.handler.dataimport.DIHCacheWriter
</str>
<str name="persistCacheImpl">
org.apache.solr.handler.dataimport.BerkleyBackedCache
</str>
<str name="persistCacheBaseDir">...</str>
<str name="persistCacheName">data_cache</str>
<str name="cachePk">id</str>
</lst>
</requestHandler>
Thank wenca