Gus Heck created SOLR-12101:
-------------------------------

             Summary: Tests: Timeout for zk shortened by config of server
                 Key: SOLR-12101
                 URL: https://issues.apache.org/jira/browse/SOLR-12101
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
            Reporter: Gus Heck


After some digging I found this code in ZkTestServer:
{code:java}
public void run() throws InterruptedException {
  log.info("STARTING ZK TEST SERVER");
  // we don't call super.distribSetUp
  zooThread = new Thread() {
    
    @Override
    public void run() {
      ServerConfig config = new ServerConfig() {

        {
          setClientPort(ZkTestServer.this.clientPort);
          this.dataDir = zkDir;
          this.dataLogDir = zkDir;
          this.tickTime = theTickTime;
        }
        
        public void setClientPort(int clientPort) {
          if (clientPortAddress != null) {
            try {
              this.clientPortAddress = new InetSocketAddress(
                      InetAddress.getByName(clientPortAddress.getHostName()), 
clientPort);
            } catch (UnknownHostException e) {
              throw new RuntimeException(e);
            }
          } else {
            this.clientPortAddress = new InetSocketAddress(clientPort);
          }
          log.info("client port:" + this.clientPortAddress);
        }
      };

      try {
        zkServer.runFromConfig(config);
      } catch (Throwable e) {
        throw new RuntimeException(e);
      }
    }
  };

{code}
And what I noticed is that min/max timeouts are unset and theTickTime is onlly 
ever set to a big blue 1000 leading to default min/max timeout values of 2/20 
seconds 
([https://discuss.pivotal.io/hc/en-us/articles/205187157-Pivotal-HD-About-how-to-correctly-config-zookeeper-session-timeout-parameter-minSessionTimeout-and-maxSessionTimeout]
 --> jibes with the zk code I see in my editor).
 
I suggest we provide explicit min/max configs in the anonymous inner class here 
setting them back to the 3/60 defaults. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to