You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mani EZZAT <ma...@arisem.com> on 2010/03/01 08:30:47 UTC

Re: Warning : no lockType configured for...

Anyone got an idea ? I'm stuck on this and I can't find the solution

Mani EZZAT wrote:
> Hello,
>
> I have this warning even if (I think) everything is setted correctly
>
> I'm dynamically creating cores with a new index, using the same schema 
> and solrconfig.xml
> I looked at the solr code (SolrCore, Config, SolrConfig, SolrIndexWriter 
> etc...) and everything seems fine to me.
>
> The log proves me that the solrconfig.xml is correctly loaded each 
> tiime, with the lockType setted (in default AND main index)
>
> Here's a sample of the log :
>
> 2010-02-24 16:24:54,161 DEBUG [Config] solrconfig.xml 
> indexDefaults/writeLockTimeout=1000
> 2010-02-24 16:24:54,162 DEBUG [Config] solrconfig.xml 
> indexDefaults/commitLockTimeout=10000
> 2010-02-24 16:24:54,163 DEBUG [Config] solrconfig.xml 
> indexDefaults/lockType=simple
> 2010-02-24 16:24:54,163 DEBUG [PooledConnectionFactory] Reusing old 
> connection Socket[addr=/127.0.0.1,port=20000,localport=52198]
> 2010-02-24 16:24:54,164 DEBUG [Config] solrconfig.xml missing optional 
> indexDefaults/mergePolicy
> 2010-02-24 16:24:54,165 DEBUG [Config] solrconfig.xml missing optional 
> indexDefaults/mergeScheduler
> 2010-02-24 16:24:54,167 DEBUG [Config] solrconfig.xml missing optional 
> indexDefaults/luceneAutoCommit
> 2010-02-24 16:24:54,167 DEBUG [Config] solrconfig.xml 
> mainIndex/useCompoundFile=false
> 2010-02-24 16:24:54,169 DEBUG [Config] solrconfig.xml missing optional 
> mainIndex/maxBufferedDocs
> 2010-02-24 16:24:54,170 DEBUG [Config] solrconfig.xml 
> mainIndex/maxMergeDocs=2147483647
> 2010-02-24 16:24:54,170 DEBUG [PooledConnectionFactory] Reusing old 
> connection Socket[addr=/127.0.0.1,port=20000,localport=52198]
> 2010-02-24 16:24:54,171 DEBUG [Config] solrconfig.xml 
> mainIndex/mergeFactor=10
> 2010-02-24 16:24:54,172 DEBUG [Config] solrconfig.xml missing optional 
> mainIndexramBufferSizeMB
> 2010-02-24 16:24:54,173 DEBUG [Config] solrconfig.xml 
> mainIndex/maxFieldLength=10000
> 2010-02-24 16:24:54,174 DEBUG [Config] solrconfig.xml missing optional 
> mainIndex/writeLockTimeout
> 2010-02-24 16:24:54,175 DEBUG [Config] solrconfig.xml missing optional 
> mainIndex/commitLockTimeout
> 2010-02-24 16:24:54,176 DEBUG [Config] solrconfig.xml 
> mainIndex/lockType=simple
> 2010-02-24 16:24:54,177 DEBUG [Config] solrconfig.xml missing optional 
> mainIndex/mergePolicy
>
> ...
>
> and some a little after we can see :
>
> 2010-02-24 16:24:54,218 INFO  [Config] Loaded SolrConfig: solrconfig.xml
>
> So I think I can assume that the solrconfig.xml is correctly parsed for 
> each new core (Those logs are written each time a new core is created)
>
> But I still keep getting those warning :
>
> 2010-02-24 16:24:54,520 INFO  [SolrCore] [core1] Searching for 
> listeners: //listener[@event="firstSearcher"]
> 2010-02-24 16:24:54,522 INFO  [SolrCore] [core1] Added 
> SolrEventListener: 
> org.apache.solr.core.QuerySenderListener{queries=[{q=fast_warm,start=0,rows=10}, 
> {q=static firstSearcher warming query from solrconfig.xml}]}
> 2010-02-24 16:24:54,522 INFO  [SolrCore] [core1] Searching for 
> listeners: //listener[@event="newSearcher"]
> 2010-02-24 16:24:54,524 INFO  [SolrCore] [core1] Added 
> SolrEventListener: 
> org.apache.solr.core.QuerySenderListener{queries=[{q=solr,start=0,rows=10}, 
> {q=rocks,start=0,rows=10}, {q=static newSearcher warming query from 
> solrconfig.xml}]}
> 2010-02-24 16:24:54,525 DEBUG [Config] solrconfig.xml 
> mainIndex/deletionPolicy/@class=solr.SolrDeletionPolicy
> 2010-02-24 16:24:54,526 DEBUG [Config] solrconfig.xml 
> mainIndex/unlockOnStartup=false
> 2010-02-24 16:24:54,527 WARN  [SolrCore] [core1] Solr index directory 
> '/home/dev/Desktop/athena-alerts-server-zip-1.0.8/athena-alerts-server/multicore/core1/data/index' 
> doesn't exist. Creating new index...
> 2010-02-24 16:24:54,540 WARN  [SolrIndexWriter] No lockType configured 
> for 
> /home/dev/Desktop/athena-alerts-server-zip-1.0.8/athena-alerts-server/multicore/core1/data/index/ 
> assuming 'simple'
> 2010-02-24 16:24:54,618 DEBUG [SolrIndexWriter] Opened Writer 
> SolrCore.initIndex
> 2010-02-24 16:24:54,619 DEBUG [SolrIndexWriter] Closing Writer 
> SolrCore.initIndex
>
> The first warning is ok, beacause I create a new empty index each time.
> But I don't understand why I have the 2nd about the lockType. It is 
> correctly set and loaded.
>
> Do you have any idea why this is happening ?
>
> (btw, i'm using Solr Revision 772051)
>
> Best regards,
>
> EZZAT Mani
>
>
>   


Re: Warning : no lockType configured for...

Posted by Lance Norskog <go...@gmail.com>.
Doing an exhaustive scan of this problem, I did find this one hole:

This constructor is not deprecated, but it uses a super() call that is
deprecated. Also, this constructor is not used anywhere. I nominate it
for deprecation as well.

SolrIndexWriter.java, around line 170
  /**
   *
   */
  public SolrIndexWriter(String name, String path, DirectoryFactory
dirFactory, boolean create, IndexSchema schema) throws IOException {
    super(getDirectory(path, dirFactory, null), false,
schema.getAnalyzer(), create);
    init(name, schema, null);
  }


On 3/9/10, Chris Hostetter <ho...@fucit.org> wrote:
>
> : Ok I think I know where the problem is
> 	...
> : It's  the constructor used by SolrCore  in r772051
>
> Ughhh... so to be clear: you haven't been using Solr 1.4 at any point in
> this thread?
>
> that explains why no one else could recreate the problem you were
> describing.
>
> For future refrence: if you aren't using the most recently
> released version of Solr when you post a question about a possible bug,
> please make that very clear right up at the top of your message, and if
> you think you've found a bug, pelase make sure to test against the most
> recently released version to see if it's already been fixed.
>
> : PS : should I fill some kind of bug report even if everything is ok now ?
> (I'm
> : asking because I didn't see anything related to this problem in JIRA, so
> maybe
> : if you want to keep a trace...)
>
> If you can recreate the problem using Solr 1.3, then feel free to file a
> bug, noting that it was only a problem in 1.3, but has already been fixed
> in 1.4 ... but we don't usually bother tracking bugs against arbitrary
> unlreased points from the trunk (unless they are current).  I'm sure there
> are lots of bugs that existed only transiently as features were being
> fleshed out.
>
>
> -Hoss
>
>


-- 
Lance Norskog
goksron@gmail.com

Re: Warning : no lockType configured for...

Posted by Chris Hostetter <ho...@fucit.org>.
: Ok I think I know where the problem is
	...
: It's  the constructor used by SolrCore  in r772051

Ughhh... so to be clear: you haven't been using Solr 1.4 at any point in 
this thread?

that explains why no one else could recreate the problem you were 
describing.

For future refrence: if you aren't using the most recently 
released version of Solr when you post a question about a possible bug, 
please make that very clear right up at the top of your message, and if 
you think you've found a bug, pelase make sure to test against the most 
recently released version to see if it's already been fixed.

: PS : should I fill some kind of bug report even if everything is ok now ? (I'm
: asking because I didn't see anything related to this problem in JIRA, so maybe
: if you want to keep a trace...)

If you can recreate the problem using Solr 1.3, then feel free to file a 
bug, noting that it was only a problem in 1.3, but has already been fixed 
in 1.4 ... but we don't usually bother tracking bugs against arbitrary 
unlreased points from the trunk (unless they are current).  I'm sure there 
are lots of bugs that existed only transiently as features were being 
fleshed out.


-Hoss


Re: Warning : no lockType configured for...

Posted by Mani EZZAT <ma...@arisem.com>.
Ok I think I know where the problem is

@Deprecated
169      public SolrIndexWriter(String name, String path, 
DirectoryFactory dirFactory, boolean create, IndexSchema schema, 
SolrIndexConfig config) throws IOException {
170        super(getDirectory(path, dirFactory, null), 
config.luceneAutoCommit, schema.getAnalyzer(), create);
171        init(name, schema, config);
172      }

It's  the constructor used by SolrCore  in r772051
As you can see, the getDirectory method take a null param instead of 
config, resulting a lockType parameter not setted

But in the current trunk, its another constructor thats used so 
everything is fine (the SolrConfig instance is in the parameter instead 
of null)

Just keeping you updated :)

Thanks for your help

PS : should I fill some kind of bug report even if everything is ok now 
? (I'm asking because I didn't see anything related to this problem in 
JIRA, so maybe if you want to keep a trace...)

Mani EZZAT wrote:
> Should I fill a bug ?
>
> Mani EZZAT wrote:
>   
>> I tired using the default solrconfig and schema (from the example in 1.3 
>> release) and I still get the same warnings
>>
>> When I look at the log, the solrconfig seems correcly loaded, but 
>> something is strange :
>> newSearcher warming query from solrconfig.xml}]}
>> 2010-03-04 10:35:32,545 DEBUG [Config] solrconfig.xml missing optional 
>> mainIndex/deletionPolicy/@class
>> 2010-03-04 10:35:32,556 DEBUG [Config] solrconfig.xml 
>> mainIndex/unlockOnStartup=false
>> 2010-03-04 10:35:32,563 WARN  [SolrCore] [core] Solr index directory 
>> './solr/data/index' doesn't exist. Creating new index...
>> 2010-03-04 10:35:32,589 WARN  [SolrIndexWriter] No lockType configured 
>> for ./solr/data/index/ assuming 'simple'
>>
>> Here I can see solr checking the properties in the Config (or maybe 
>> SolrConfig, not sure about the class) and the lockType property isn't 
>> here... and here comes the warning..
>>
>> I'm not sure what it means.  The information is lost somwhere maybe, but 
>> everything seems fine to me when I look the source code
>>
>> Also, It happens for the first core I create (and every cores after), so 
>> I don't think its related to the fact that I create dynamically several 
>> cores. Even If i create only 1 core, I'll get the warning since I get it 
>> for the first one anyway
>>
>> Mani EZZAT wrote:
>>   
>>     
>>> I don't know, I didn't try because I have the need to create a different 
>>> core each time.
>>>
>>> I'll do some tests with the default config and will report back to all 
>>> of you
>>> Thank you for your time
>>>
>>> Tom Hill. wrote:
>>>   
>>>     
>>>       
>>>> Hi Mani,
>>>>
>>>> Mani EZZAT wrote:
>>>>   
>>>>     
>>>>       
>>>>         
>>>>> I'm dynamically creating cores with a new index, using the same schema 
>>>>> and solrconfig.xml
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>> Does the problem occur if you use the same configuration in a single, static
>>>> core?
>>>>
>>>> Tom
>>>>
>>>>   
>>>>     
>>>>       
>>>>         
>>>   
>>>     
>>>       
>>   
>>     
>
>   


Re: Warning : no lockType configured for...

Posted by Mani EZZAT <ma...@arisem.com>.
Should I fill a bug ?

Mani EZZAT wrote:
> I tired using the default solrconfig and schema (from the example in 1.3 
> release) and I still get the same warnings
>
> When I look at the log, the solrconfig seems correcly loaded, but 
> something is strange :
> newSearcher warming query from solrconfig.xml}]}
> 2010-03-04 10:35:32,545 DEBUG [Config] solrconfig.xml missing optional 
> mainIndex/deletionPolicy/@class
> 2010-03-04 10:35:32,556 DEBUG [Config] solrconfig.xml 
> mainIndex/unlockOnStartup=false
> 2010-03-04 10:35:32,563 WARN  [SolrCore] [core] Solr index directory 
> './solr/data/index' doesn't exist. Creating new index...
> 2010-03-04 10:35:32,589 WARN  [SolrIndexWriter] No lockType configured 
> for ./solr/data/index/ assuming 'simple'
>
> Here I can see solr checking the properties in the Config (or maybe 
> SolrConfig, not sure about the class) and the lockType property isn't 
> here... and here comes the warning..
>
> I'm not sure what it means.  The information is lost somwhere maybe, but 
> everything seems fine to me when I look the source code
>
> Also, It happens for the first core I create (and every cores after), so 
> I don't think its related to the fact that I create dynamically several 
> cores. Even If i create only 1 core, I'll get the warning since I get it 
> for the first one anyway
>
> Mani EZZAT wrote:
>   
>> I don't know, I didn't try because I have the need to create a different 
>> core each time.
>>
>> I'll do some tests with the default config and will report back to all 
>> of you
>> Thank you for your time
>>
>> Tom Hill. wrote:
>>   
>>     
>>> Hi Mani,
>>>
>>> Mani EZZAT wrote:
>>>   
>>>     
>>>       
>>>> I'm dynamically creating cores with a new index, using the same schema 
>>>> and solrconfig.xml
>>>>     
>>>>       
>>>>         
>>> Does the problem occur if you use the same configuration in a single, static
>>> core?
>>>
>>> Tom
>>>
>>>   
>>>     
>>>       
>>   
>>     
>
>   


Re: Warning : no lockType configured for...

Posted by Mani EZZAT <ma...@arisem.com>.
I tired using the default solrconfig and schema (from the example in 1.3 
release) and I still get the same warnings

When I look at the log, the solrconfig seems correcly loaded, but 
something is strange :
newSearcher warming query from solrconfig.xml}]}
2010-03-04 10:35:32,545 DEBUG [Config] solrconfig.xml missing optional 
mainIndex/deletionPolicy/@class
2010-03-04 10:35:32,556 DEBUG [Config] solrconfig.xml 
mainIndex/unlockOnStartup=false
2010-03-04 10:35:32,563 WARN  [SolrCore] [core] Solr index directory 
'./solr/data/index' doesn't exist. Creating new index...
2010-03-04 10:35:32,589 WARN  [SolrIndexWriter] No lockType configured 
for ./solr/data/index/ assuming 'simple'

Here I can see solr checking the properties in the Config (or maybe 
SolrConfig, not sure about the class) and the lockType property isn't 
here... and here comes the warning..

I'm not sure what it means.  The information is lost somwhere maybe, but 
everything seems fine to me when I look the source code

Also, It happens for the first core I create (and every cores after), so 
I don't think its related to the fact that I create dynamically several 
cores. Even If i create only 1 core, I'll get the warning since I get it 
for the first one anyway

Mani EZZAT wrote:
> I don't know, I didn't try because I have the need to create a different 
> core each time.
>
> I'll do some tests with the default config and will report back to all 
> of you
> Thank you for your time
>
> Tom Hill. wrote:
>   
>> Hi Mani,
>>
>> Mani EZZAT wrote:
>>   
>>     
>>> I'm dynamically creating cores with a new index, using the same schema 
>>> and solrconfig.xml
>>>     
>>>       
>> Does the problem occur if you use the same configuration in a single, static
>> core?
>>
>> Tom
>>
>>   
>>     
>
>   


Re: Warning : no lockType configured for...

Posted by Mani EZZAT <ma...@arisem.com>.
I don't know, I didn't try because I have the need to create a different 
core each time.

I'll do some tests with the default config and will report back to all 
of you
Thank you for your time

Tom Hill. wrote:
> Hi Mani,
>
> Mani EZZAT wrote:
>   
>> I'm dynamically creating cores with a new index, using the same schema 
>> and solrconfig.xml
>>     
>
> Does the problem occur if you use the same configuration in a single, static
> core?
>
> Tom
>
>   


Re: Warning : no lockType configured for...

Posted by "Tom Hill." <na...@worldware.com>.
Hi Mani,

Mani EZZAT wrote:
> I'm dynamically creating cores with a new index, using the same schema 
> and solrconfig.xml

Does the problem occur if you use the same configuration in a single, static
core?

Tom

-- 
View this message in context: http://old.nabble.com/Re%3A-Warning-%3A-no-lockType-configured-for...-tp27740724p27758951.html
Sent from the Solr - User mailing list archive at Nabble.com.