You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Ramneet Tung <Ra...@elasticpath.com> on 2008/07/12 03:49:36 UTC
Issue with unlockOnStartup
Hi all,
I'm having a problem with using the unlockOnStartup in the solrconfig.xml. When I set this to true, I am finding that when the file is to be found (say after a solr crash or solr being shutdown inappropriately) for unlocking that it is just looking for "write.lock" but really it should be looking for "XXXX-write-lock". The issue seems to be that when SolrCore calls the getDirectory method in FSDirectory that the lockFactory is set to null which eventually causes the prefix to be cleared (the XXXX). When the file is to be written to by the SolrIndexReader, the lockFactory is set appropriately by the getDirectory method in the SolrIndexWriter which also sets the prefix to XXXX for the file to be written to. I believe this to be a bug in implementation? Any feedback that you could provide would be greatly appreciated. The steps to reproduce are as follows:
1. Start solr
2. Make a .lock file appear in your directory
3. While index is building stop the server to interrupt
4. Modify the solrconfig.xml to have unlockOnStartup set to true
5. Star the solr and see if you get the Lock Obtained time out exception and the file is still present.
Sincerely,
Ramneet
[http://www.elasticpath.com/images/ep-logo.gif]
Ramneet Tung
Developer
Phone: 604.408.8078
Ramneet.Tung@elasticpath.com<ma...@elasticpath.com>
Elastic Path Software, Inc.
225 West 8th Avenue, 3rd Floor
Vancouver, BC V5Y 1N3
Fax: 604.408.8079
Web: www.elasticpath.com<http://www.elasticpath.com/>
Blog: www.getelastic.com<http://www.getelastic.com/>
Read the latest Elastic Path report:
The Ecommerce Checkout Report: Tactics of the Top 100 Online Retailers<http://www.elasticpath.com/white-papers/ecommerce-checkout-report/>
RE: Issue with unlockOnStartup
Posted by Ramneet Tung <Ra...@elasticpath.com>.
Thanks so much for your help, we are currently using an older version of lucene but managed to port your fix over and it worked magnificently. We appreciate it very much.
Sincerely,
Ramneet
--------------------------------------------------------------------------
Ramneet Tung - Developer
Elastic Path Software, Inc.
Phone 604.408.8078 ext.
Email mailto:Ramneet.Tung@elasticpath.com
Web http://www.elasticpath.com/
Blog http://www.getelastic.com/
Read the latest Elastic Path report:
The Ecommerce Checkout Report: Tactics of the Top 100 Online Retailers
http://www.elasticpath.com/white-papers/ecommerce-checkout-report/
-----Original Message-----
From: yseeley@gmail.com [mailto:yseeley@gmail.com] On Behalf Of Yonik Seeley
Sent: Saturday, July 12, 2008 9:29 AM
To: solr-dev@lucene.apache.org
Subject: Re: Issue with unlockOnStartup
I just committed a fix for this.
-Yonik
On Fri, Jul 11, 2008 at 9:49 PM, Ramneet Tung
<Ra...@elasticpath.com> wrote:
> Hi all,
>
> I'm having a problem with using the unlockOnStartup in the solrconfig.xml. When I set this to true, I am finding that when the file is to be found (say after a solr crash or solr being shutdown inappropriately) for unlocking that it is just looking for "write.lock" but really it should be looking for "XXXX-write-lock". The issue seems to be that when SolrCore calls the getDirectory method in FSDirectory that the lockFactory is set to null which eventually causes the prefix to be cleared (the XXXX). When the file is to be written to by the SolrIndexReader, the lockFactory is set appropriately by the getDirectory method in the SolrIndexWriter which also sets the prefix to XXXX for the file to be written to. I believe this to be a bug in implementation? Any feedback that you could provide would be greatly appreciated. The steps to reproduce are as follows:
>
> 1. Start solr
> 2. Make a .lock file appear in your directory
> 3. While index is building stop the server to interrupt
> 4. Modify the solrconfig.xml to have unlockOnStartup set to true
> 5. Star the solr and see if you get the Lock Obtained time out exception and the file is still present.
>
>
> Sincerely,
>
> Ramneet
>
> [http://www.elasticpath.com/images/ep-logo.gif]
> Ramneet Tung
> Developer
> Phone: 604.408.8078
> Ramneet.Tung@elasticpath.com<ma...@elasticpath.com>
> Elastic Path Software, Inc.
> 225 West 8th Avenue, 3rd Floor
> Vancouver, BC V5Y 1N3
> Fax: 604.408.8079
> Web: www.elasticpath.com<http://www.elasticpath.com/>
> Blog: www.getelastic.com<http://www.getelastic.com/>
> Read the latest Elastic Path report:
> The Ecommerce Checkout Report: Tactics of the Top 100 Online Retailers<http://www.elasticpath.com/white-papers/ecommerce-checkout-report/>
>
>
>
>
>
Re: Issue with unlockOnStartup
Posted by Yonik Seeley <yo...@apache.org>.
I just committed a fix for this.
-Yonik
On Fri, Jul 11, 2008 at 9:49 PM, Ramneet Tung
<Ra...@elasticpath.com> wrote:
> Hi all,
>
> I'm having a problem with using the unlockOnStartup in the solrconfig.xml. When I set this to true, I am finding that when the file is to be found (say after a solr crash or solr being shutdown inappropriately) for unlocking that it is just looking for "write.lock" but really it should be looking for "XXXX-write-lock". The issue seems to be that when SolrCore calls the getDirectory method in FSDirectory that the lockFactory is set to null which eventually causes the prefix to be cleared (the XXXX). When the file is to be written to by the SolrIndexReader, the lockFactory is set appropriately by the getDirectory method in the SolrIndexWriter which also sets the prefix to XXXX for the file to be written to. I believe this to be a bug in implementation? Any feedback that you could provide would be greatly appreciated. The steps to reproduce are as follows:
>
> 1. Start solr
> 2. Make a .lock file appear in your directory
> 3. While index is building stop the server to interrupt
> 4. Modify the solrconfig.xml to have unlockOnStartup set to true
> 5. Star the solr and see if you get the Lock Obtained time out exception and the file is still present.
>
>
> Sincerely,
>
> Ramneet
>
> [http://www.elasticpath.com/images/ep-logo.gif]
> Ramneet Tung
> Developer
> Phone: 604.408.8078
> Ramneet.Tung@elasticpath.com<ma...@elasticpath.com>
> Elastic Path Software, Inc.
> 225 West 8th Avenue, 3rd Floor
> Vancouver, BC V5Y 1N3
> Fax: 604.408.8079
> Web: www.elasticpath.com<http://www.elasticpath.com/>
> Blog: www.getelastic.com<http://www.getelastic.com/>
> Read the latest Elastic Path report:
> The Ecommerce Checkout Report: Tactics of the Top 100 Online Retailers<http://www.elasticpath.com/white-papers/ecommerce-checkout-report/>
>
>
>
>
>