Good catch . but it is not obvious that the refCount was incremented .
Should we not have a method to return the searcher without
incrementing the refcount ? something like
SolrCore#getSearcherNoIncRef()
Anyone who is not using the IndexSearcher for searching will need that


On Thu, Jul 17, 2008 at 10:11 AM, Yonik Seeley (JIRA) <[EMAIL PROTECTED]> wrote:
>
>    [ 
> https://issues.apache.org/jira/browse/SOLR-561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614218#action_12614218
>  ]
>
> [EMAIL PROTECTED] edited comment on SOLR-561 at 7/16/08 9:39 PM:
> ------------------------------------------------------------
>
> bq. it doesn't seem like old files are being removed on the slave for me... 
> actually I think this is related to the fact that I don't see old searchers 
> being cleaned up... my slave currently has 4 open - one for each index 
> version.
>
> OK, I found the bug that caused this one...
> Line SnapPuller.java:172
>  core.getSearcher().get()....
> That pattern is almost always a bug... getSearcher() returns a RefCounted 
> object that performs the reference counting on the SolrIndexSearcher.  It 
> must be decremented (normally via a finally block).
>
> Oh... and more internal code comments would be welcome (I don't know if it's 
> practical to add them after the fact... I find myself adding them for my own 
> notes/thoughts as I develop).
>
>
>      was (Author: [EMAIL PROTECTED]):
>    bq. it doesn't seem like old files are being removed on the slave for 
> me... actually I think this is related to the fact that I don't see old 
> searchers being cleaned up... my slave currently has 4 open - one for each 
> index version.
>
> OK, I found the bug that caused this one...
> Line ReplicationHandler:172
>  core.getSearcher().get()....
> That pattern is almost always a bug... getSearcher() returns a RefCounted 
> object that performs the reference counting on the SolrIndexSearcher.  It 
> must be decremented (normally via a finally block).
>
> Oh... and more internal code comments would be welcome (I don't know if it's 
> practical to add them after the fact... I find myself adding them for my own 
> notes/thoughts as I develop).
>
>
>> Solr replication by Solr (for windows also)
>> -------------------------------------------
>>
>>                 Key: SOLR-561
>>                 URL: https://issues.apache.org/jira/browse/SOLR-561
>>             Project: Solr
>>          Issue Type: New Feature
>>          Components: replication
>>    Affects Versions: 1.3
>>         Environment: All
>>            Reporter: Noble Paul
>>         Attachments: deletion_policy.patch, SOLR-561.patch, SOLR-561.patch, 
>> SOLR-561.patch
>>
>>
>> The current replication strategy in solr involves shell scripts . The 
>> following are the drawbacks with the approach
>> *  It does not work with windows
>> * Replication works as a separate piece not integrated with solr.
>> * Cannot control replication from solr admin/JMX
>> * Each operation requires manual telnet to the host
>> Doing the replication in java has the following advantages
>> * Platform independence
>> * Manual steps can be completely eliminated. Everything can be driven from 
>> solrconfig.xml .
>> ** Adding the url of the master in the slaves should be good enough to 
>> enable replication. Other things like frequency of
>> snapshoot/snappull can also be configured . All other information can be 
>> automatically obtained.
>> * Start/stop can be triggered from solr/admin or JMX
>> * Can get the status/progress while replication is going on. It can also 
>> abort an ongoing replication
>> * No need to have a login into the machine
>> This issue can track the implementation of solr replication in java
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>



-- 
--Noble Paul

Reply via email to