You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mark Miller (JIRA)" <ji...@apache.org> on 2018/03/17 19:03:00 UTC

[jira] [Resolved] (SOLR-12101) Tests: Timeout for zk shortened by config of server

     [ https://issues.apache.org/jira/browse/SOLR-12101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Miller resolved SOLR-12101.
--------------------------------
       Resolution: Fixed
    Fix Version/s: master (8.0)
                   7.4

Thanks Gus!

> 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
>            Assignee: Mark Miller
>            Priority: Major
>             Fix For: 7.4, master (8.0)
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org