"Solr Tips" method for shortening election time Solrcloud

Source: Internet
Author: User

Original: http://blog.csdn.net/duck_genuine/article/details/8332935

When a leader hangs, a few of them replica to re-elect a leader out, but the default is to wait 3 minutes, this time is too long. For the first time in the test Solrcloud feature, waiting so long, may feel the frustration of re-election failure.

As you can see by default, when a leader Guacai, the log prints as follows:

Info:waiting until we see more replicas up:total=3 found=1 Timeoutin=171467dec, 10:14:40 AM Org.apache.solr.clou D.shardleaderelectioncontext waitforreplicastocomeupinfo:waiting until we see more replicas up:total=3 found=1 Timeouti N=170965dec, 10:14:41 AM org.apache.solr.cloud.ShardLeaderElectionContext waitforreplicastocomeupinfo: Waiting until we see more replicas up:total=3 found=1 Timeoutin=170463dec, 10:14:41 AM Org.apache.solr.cloud.Shar Dleaderelectioncontext waitforreplicastocomeupinfo:waiting until we see more replicas up:total=3 found=1 timeoutin=1699 61

You can only accept 3 minutes of waiting, you can also reduce the wait for 3 minutes (such as 10 seconds or 0 seconds)

Configure election wait Time:

Configure on Solr.xml:

leadervotewait= "${leadervotewait:20000}"

<?xml version= "1.0" encoding= "UTF-8"?>

<SOLR persistent= "true" >

<cores defaultcorename= "Video_shard1" adminpath= "/admin/cores" zkclienttimeout= "${zkClientTimeout:1500}" Hostport= "${jetty.port:}" hostcontext= "Solr" leadervotewait= "${leadervotewait:20000}" >

</cores>

</solr>

"Solr Tips" method for shortening election time Solrcloud

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.