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