Solr4.6 master-slave synchronization Configuration

Source: Internet
Author: User

Today, solr4.6 servers are built on two different test servers. Verify that the two solr start normally, follow the solr wiki master-slave configuration scheme for master-slave configuration, this is the solr wiki given the master-slave synchronization scheme: http://wiki.apache.org/solr/SolrReplication

The master-slave synchronization of solr is configured by core. The solrconfig. xml of each core requires the master-slave configuration.

The solrconfig. xml configuration under the core of the master node:

<requestHandler name="/replication" class="solr.ReplicationHandler" >      <lst name="master">              <str name="replicateAfter">commit</str>              <str name="replicateAfter">startup</str>              <str name="confFiles">schema.xml</str>      </lst>  </requestHandler>
This configuration means that the synchronization will be performed once the server is restarted or when data commit exists.

Configure solrconfig. xml under the core of the slave node:

<requestHandler name="/replication" class="solr.ReplicationHandler" >    <lst name="slave">        <str name="masterUrl">http://10.28.175.246:8080/solr/waiter</str>        <str name="pollInterval">00:00:20</str>     </lst> </requestHandler>
The configuration means that the rotation training takes the master node to update the log for 20 seconds, the pull address is http: // 10.28.175.246: 8080/solr, And the synchronized core is waiter.

Restart two solr instances. Verify the master-slave synchronization.

Add data on the master node through the page:


The problem occurs. The data added through the page cannot be synchronized to the slave node! If multiple data entries are added to the page, they are not synchronized to the slave node. Data is available only when the master node is restarted.

Check all kinds of configuration problems and various information on the Internet!

As a result, I used code to submit data on the master node, tested adding and deleting data, and called the commit () method after the code. The master-slave synchronization is normal! At this time, a runny nose is a tear. I am relieved that the Code call is normal.

It is preliminarily determined that solr4.6 is used to manage the data added on the page. The solr server itself does not call the commit () method. I can only say that the solr management interface is very poor... Full-faced internal flow ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.