You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "pavan patel (JIRA)" <ji...@apache.org> on 2014/03/17 09:54:43 UTC

[jira] [Closed] (SOLR-5849) write.lock is not removed by LogReplayer

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

pavan patel closed SOLR-5849.
-----------------------------

    Resolution: Invalid

Marking this bug invalid as this is not a solr issue.

In my application we had two cores and we were initializing the SolrCoreContainer twice in our factory class. Because of that the write.lock issue was coming.

> write.lock is not removed by LogReplayer
> ----------------------------------------
>
>                 Key: SOLR-5849
>                 URL: https://issues.apache.org/jira/browse/SOLR-5849
>             Project: Solr
>          Issue Type: Bug
>         Environment: Windows 7, Tomcat 7.0.52, Solr 4.3.0, jdk1.7.0_51 
>            Reporter: pavan patel
>
> In my application I am using SolrEmbeddedServer inside tomcat. I have below configuration for my core:-
> <lockType>simple</lockType>
> <unlockOnStartup>true</unlockOnStartup>
> <updateLog>
>       <str name="dir">${solr.ulog.dir:}</str>
> </updateLog>
>  <autoCommit> 
>        <maxTime>15000</maxTime> 
>        <openSearcher>false</openSearcher> 
>  </autoCommit>
> <autoSoftCommit> 
>          <maxTime>1000</maxTime> 
> </autoSoftCommit>
> The issue I am facing is when I restart tocmat and in case there is any uncommitted data  in tlog, then I am getting below exception:-
> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@F:\mydir\Install\solr\conf\alerts\data\index\write.lock
> 	at org.apache.lucene.store.Lock.obtain(Lock.java:84)
> 	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:644)
> 	at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:77)
> 	at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:64)
> 	at org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:197)
> 	at org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:110)
> 	at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:148)
> 	at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)
> 	at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
> 	at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:504)
> 	at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:640)
> 	at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:396)
> 	at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
> 	at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:246)
> 	at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:173)
> 	at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
> 	at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
> 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1816)
> 	at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:150)
> 	at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:117)
> 	at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:68)
> 	at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:54)
> After restart I am not able to index anything into the solr. I debug the code and found out that LogReplayer during start up creates the SolrIndexWriter on core and that creates the write.lock file. Once all the leftover tlog's are indexed, the write.lock remains there, its not getting deleted. So when my application tries to add document the SolrIndexWriter is not able to create the lock because write.lock already exists.
> This seems to be a bug in Solr 4.3.0, because I believe SolrIndexWriter created during  LogReplayer is not closed, and that is causing the write.lock leftover in data directory.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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