lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-2422) Improve reliability of ZkSolrClientTest
Date Sat, 12 Mar 2011 02:38:59 GMT

    [ https://issues.apache.org/jira/browse/SOLR-2422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005976#comment-13005976
] 

Robert Muir commented on SOLR-2422:
-----------------------------------

There's definitely something up with the exception message here, but maybe something else
going on with reconnection or similar?

Because I noticed when the test failed before with the 100ms timeout, it would print:
{noformat}
1 tests failed.
FAILED:  org.apache.solr.cloud.ZkSolrClientTest.testConnect

Error Message:
Could not connect to ZooKeeper 127.0.0.1:30762/solr within 30000 ms
{noformat}

I think this is what made it hard to debug problems, it made me think it was actually waiting
30000ms, but in fact was only waiting 100ms.

Looking at ConnectionManager, I think this might indicate a bug (at least in the exception
message, but the use of "two timeouts" seems wrong)... i added my comments to the source snippet:

{noformat}
try {
        // zkClientTimeout = 100ms
        connectionStrategy.reconnect(zkServerAddress, zkClientTimeout, this, new ZkClientConnectionStrategy.ZkUpdate()
{
          @Override
          public void update(SolrZooKeeper keeper) throws InterruptedException, TimeoutException,
IOException {
           // DEFAULT_CLIENT_CONNECT_TIMEOUT = 30000ms
           waitForConnected(SolrZkClient.DEFAULT_CLIENT_CONNECT_TIMEOUT);
           client.updateKeeper(keeper);
           if(onReconnect != null) {
             onReconnect.command();
           }
           ConnectionManager.this.connected = true;
          }
        });
      } catch (Exception e) {
        log.error("", e); // fails after 100ms, but says it waited 30000ms?!
      }
{noformat}

> Improve reliability of ZkSolrClientTest
> ---------------------------------------
>
>                 Key: SOLR-2422
>                 URL: https://issues.apache.org/jira/browse/SOLR-2422
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>
> The ZKSolrClient test is pretty unreliable, it seems to fail a significant portion of
the time on hudson (often on my local as well).
> Additionally it seems to somehow sometimes (maybe depending upon retry loop?) leave a
lot of zookeeper threads running.
> I ran into these issues when i discovered that trying to interrupt() these threads after
the test completed was triggering a JRE bug, but by working through it I saw how unreliable
the test is.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message