zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2784) Add some limitations on code level for `SID` to avoid configuration problem
Date Fri, 19 May 2017 20:26:05 GMT

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

ASF GitHub Bot commented on ZOOKEEPER-2784:
-------------------------------------------

Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/257#discussion_r117566584
  
    --- Diff: src/java/test/org/apache/zookeeper/test/CnxManagerTest.java ---
    @@ -351,15 +351,55 @@ public void testSocketTimeout() throws Exception {
             LOG.info("Election port: " + port);
             Thread.sleep(1000);
     
    -        Socket sock = new Socket();
    -        sock.connect(peers.get(1L).electionAddr, 5000);
    -        long begin = Time.currentElapsedTime();
    -        // Read without sending data. Verify timeout.
    -        cnxManager.receiveConnection(sock);
    -        long end = Time.currentElapsedTime();
    -        if((end - begin) > ((peer.getSyncLimit() * peer.getTickTime()) + 500)) Assert.fail("Waited
more than necessary");
    -        cnxManager.halt();
    -        Assert.assertFalse(cnxManager.listener.isAlive());
    +        try (Socket sock = new Socket()) {
    --- End diff --
    
    +1, although please feel free to submit a jira and fix it there!


> Add some limitations on code level for `SID` to avoid configuration problem
> ---------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2784
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2784
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: quorum
>    Affects Versions: 3.5.2
>            Reporter: Benedict Jin
>             Fix For: 3.6.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> As so far, `QuorumCnxManager#receiveConnection` cannot find out the same `SID` problem,
then the Zookeeper cluster will start successfully. But the cluster is not health, and it
will throw some problem like `not synchronized`. So, i thought we should add some limitations
on code level for `SID` to find those configuration problem more early.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message