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 04:09:04 GMT

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

ASF GitHub Bot commented on ZOOKEEPER-2784:

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

    --- Diff: src/java/test/org/apache/zookeeper/test/CnxManagerTest.java ---
    @@ -18,36 +18,32 @@
     package org.apache.zookeeper.test;
    -import java.io.ByteArrayInputStream;
    -import java.io.ByteArrayOutputStream;
    -import java.io.DataInputStream;
    -import java.io.DataOutputStream;
    -import java.io.File;
    -import java.net.InetSocketAddress;
    -import java.nio.ByteBuffer;
    -import java.nio.channels.SocketChannel;
    -import java.util.ArrayList;
    -import java.util.Date;
    -import java.util.HashMap;
    -import java.util.Random;
    -import java.util.concurrent.TimeUnit;
    -import java.net.Socket;
    -import org.apache.zookeeper.common.Time;
    -import org.slf4j.Logger;
    -import org.slf4j.LoggerFactory;
     import org.apache.zookeeper.PortAssignment;
     import org.apache.zookeeper.ZKTestCase;
    +import org.apache.zookeeper.common.Time;
     import org.apache.zookeeper.server.quorum.QuorumCnxManager;
    -import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
     import org.apache.zookeeper.server.quorum.QuorumCnxManager.InitialMessage;
    +import org.apache.zookeeper.server.quorum.QuorumCnxManager.Message;
     import org.apache.zookeeper.server.quorum.QuorumPeer;
     import org.apache.zookeeper.server.quorum.QuorumPeer.LearnerType;
     import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
     import org.apache.zookeeper.server.quorum.QuorumPeer.ServerState;
     import org.junit.Assert;
     import org.junit.Before;
     import org.junit.Test;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +import java.io.*;
    --- End diff --
    @asdf2014 FYI, ZK codebase gives preference to explicit imports instead of using wildcards.

> 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

View raw message