[ 
https://issues.apache.org/jira/browse/SOLR-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13564733#comment-13564733
 ] 

Senthuran Sivananthan edited comment on SOLR-4370 at 1/28/13 10:38 PM:
-----------------------------------------------------------------------

Tested the patch on 4.2 from 
http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/ and found a 
couple issues when solr.commitwithin.softcommit = false.  The setting allows 
the slaves to replicate the indices and I can see the index files updated after 
commitWithin timeframe.

The issues are:

1/ Stats on the collection overview page doesn't get updated.  This includes 
the generation & version info.  An explicit commit (i.e. 
http://localhost:8983/solr/collection1/update?commit=true) will update the 
stats.

2/ Can't find the indexed docs on the master.  An explicit commit solves the 
issue.

I think the patch solves the original request but introduced a couple of 
side-effects.

----

Additional info
---------------

I did a quick diff between explicit commit (commit=true) vs. commitWithin=2000 
vs. HardAutoCommitTest and here's what I found.  May be I'm off track, but 
thought I share:

1.  commit = true

* A new searcher is registered

Jan 28, 2013 5:30:39 PM org.apache.solr.search.SolrIndexSearcher <init>
INFO: Opening Searcher@47955387 main
Jan 28, 2013 5:30:39 PM org.apache.solr.core.CachingDirectoryFactory close
INFO: Releasing 
directory:D:\Tools\Solr\dev\branch_4x\solr\example\solr\collection1\data\index
Jan 28, 2013 5:30:39 PM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener sending requests to Searcher@47955387 
main{StandardDirectoryReader(segments_4:9:nrt _0(4.2):C2 _2(4.2):C3)}
Jan 28, 2013 5:30:39 PM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: end_commit_flush
Jan 28, 2013 5:30:39 PM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener done.
Jan 28, 2013 5:30:39 PM org.apache.solr.core.SolrCore registerSearcher
INFO: [collection1] Registered new searcher Searcher@47955387 
main{StandardDirectoryReader(segments_4:9:nrt _0(4.2):C2 _2(4.2):C3)}


2.  commitWithin=N

New search isn't registered

Jan 28, 2013 5:31:47 PM org.apache.solr.search.SolrIndexSearcher <init>
INFO: Opening Searcher@4d000e49 realtime
Jan 28, 2013 5:31:47 PM org.apache.solr.update.DirectUpdateHandler2 commit
INFO: end_commit_flush

3.  HardAutoCommitTest

23619 T18 oasc.CachingDirectoryFactory.close Releasing 
directory:C:\Users\SENTHU~1\AppData\Local\Temp\solrtest-HardAutoCommitTest-1359411964946
23640 T18 oass.SolrIndexSearcher.<init> Opening Searcher@3b0d579 main
23642 T18 oasu.DirectUpdateHandler2.commit end_commit_flush
23654 T17 oasc.SolrCore.registerSearcher [collection1] Registered new searcher 
Searcher@3b0d579 main{StandardDirectoryReader(segments_2:4:nrt _0(4.2):C1)}
23655 T17 oasc.CachingDirectoryFactory.close Releasing 
directory:C:\Users\SENTHU~1\AppData\Local\Temp\solrtest-HardAutoCommitTest-1359411964946\index
29234 T15 C1 REQ [collection1] webapp=null path=null 
params={start=0&q=id:529&qt=standard&rows=20&version=2.2} hits=1 status=0 
QTime=4 

Any way to register a new searcher?
                
      was (Author: senthuran):
    Tested the patch on 4.2 from 
http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/ and found a 
couple issues when solr.commitwithin.softcommit = false.  The setting allows 
the slaves to replicate the indices and I can see the index files updated after 
commitWithin timeframe.

The issues are:

1/ Stats on the collection overview page doesn't get updated.  This includes 
the generation & version info.  An explicit commit (i.e. 
http://localhost:8983/solr/collection1/update?commit=true) will update the 
stats.

2/ Can't find the indexed docs on the master.  An explicit commit solves the 
issue.

I think the patch solves the original request but introduced a couple of 
side-effects.
                  
> Ability to control the commit behaviour of commitWithin
> -------------------------------------------------------
>
>                 Key: SOLR-4370
>                 URL: https://issues.apache.org/jira/browse/SOLR-4370
>             Project: Solr
>          Issue Type: New Feature
>          Components: replication (java)
>    Affects Versions: 4.0, 4.1
>            Reporter: Senthuran Sivananthan
>            Assignee: Mark Miller
>             Fix For: 4.2, 5.0
>
>         Attachments: SOLR-4370.patch
>
>
> We need the ability to control the hard/soft commit behaviour of commitWithin 
> parameter.
> Since Solr 4.0, the commitWithin's performs a soft-commit which prevents 
> slaves from picking up the changes in a master/slave configuration.
> The behaviour I'm thinking is as follows:
> 1.  By default, commitWithin will trigger soft commits.
> 2.  But this behaviour can be overwritten in solrconfig.xml to allow 
> commitWithin to perform hard commits, which will allow slaves to pick up the 
> changes.
>       <commitWithin>
>               <forceHardCommit>true</forceHardCommit> <!-- default is false 
> -->
>       </commitWithin>
> Related to SOLR-4100

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to