You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2014/09/17 20:55:36 UTC
[jira] [Commented] (SOLR-6531) better error message when lockType
doesn't work with directoryFactory
[ https://issues.apache.org/jira/browse/SOLR-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137745#comment-14137745 ]
Hoss Man commented on SOLR-6531:
--------------------------------
here's an example from a test failure noted in SOLR-6531...
{noformat}
[junit4] 2> NOTE: reproduce with: ant test -Dtestcase=CoreMergeIndexesAdminHandlerTest -Dtests.method=testMergeIndexesCoreAdminHandler -Dtests.seed=CD7BE4551EE0F637 -Dtests.slow=true -Dtests.locale=zh_SG -Dtests.timezone=Asia/Calcutta -Dtests.file.encoding=US-ASCII
[junit4] ERROR 0.05s | CoreMergeIndexesAdminHandlerTest.testMergeIndexesCoreAdminHandler <<<
[junit4] > Throwable #1: org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Unrecognized lockType: single
[junit4] > at __randomizedtesting.SeedInfo.seed([CD7BE4551EE0F637:8111B29C08B928C]:0)
[junit4] > at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:745)
[junit4] > at org.apache.solr.handler.admin.CoreMergeIndexesAdminHandlerTest.testMergeIndexesCoreAdminHandler(CoreMergeIndexesAdminHandlerTest.java:81)
[junit4] > at java.lang.Thread.run(Thread.java:745)
[junit4] > Caused by: org.apache.solr.common.SolrException: Unrecognized lockType: single
[junit4] > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:889)
[junit4] > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:651)
[junit4] > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:491)
[junit4] > at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255)
[junit4] > at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249)
[junit4] > at java.util.concurrent.FutureTask.run(FutureTask.java:262)
[junit4] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[junit4] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[junit4] > ... 1 more
[junit4] > Caused by: org.apache.solr.common.SolrException: Unrecognized lockType: single
[junit4] > at org.apache.solr.core.StandardDirectoryFactory.createLockFactory(StandardDirectoryFactory.java:73)
[junit4] > at org.apache.solr.core.CachingDirectoryFactory.get(CachingDirectoryFactory.java:350)
[junit4] > at org.apache.solr.core.SolrCore.getNewIndexDir(SolrCore.java:275)
[junit4] > at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:487)
[junit4] > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:793)
[junit4] > ... 8 more
{noformat}
...at the time of that failure "single" was not a valid lockType for the StandardDirectoryFactory - but it was a valid lockType for other facotries.
the error message doesn't make that clear though -- so if you had "single" in your config for a while, and then later change the factory you'll suddenly get a weird error even though you know that "single" use to be valid.
---
ideally the error message should be something like "lockType "foo" not supported when using directoryFactory "bar", valid lock types for this directory: yaz, zot, zing"
> better error message when lockType doesn't work with directoryFactory
> ---------------------------------------------------------------------
>
> Key: SOLR-6531
> URL: https://issues.apache.org/jira/browse/SOLR-6531
> Project: Solr
> Issue Type: Improvement
> Reporter: Hoss Man
>
> SOLR-6519 improved the logic about which lockTypes could be configured with which directoryFactory implementations, but the result is a somewhat confusing error message.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org