drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudheeshkatkam <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3714: Avoid cascading disconnection when...
Date Thu, 07 Apr 2016 05:47:34 GMT
Github user sudheeshkatkam commented on a diff in the pull request:

    --- Diff: exec/rpc/src/main/java/org/apache/drill/exec/rpc/RequestIdMap.java ---
    @@ -20,51 +20,82 @@
     import io.netty.buffer.ByteBuf;
     import io.netty.channel.ChannelFuture;
    -import java.util.Map;
    -import java.util.concurrent.ConcurrentHashMap;
    +import java.util.concurrent.atomic.AtomicBoolean;
    +import java.util.concurrent.atomic.AtomicInteger;
     import org.apache.drill.common.exceptions.UserRemoteException;
     import org.apache.drill.exec.proto.UserBitShared.DrillPBError;
    +import com.carrotsearch.hppc.IntObjectHashMap;
    +import com.carrotsearch.hppc.procedures.IntObjectProcedure;
    +import com.google.common.base.Preconditions;
    - * Manages the creation of rpc futures for a particular socket.
    + * Manages the creation of rpc futures for a particular socket <--> socket
    + * connection. Generally speaking, there will be two threads working with this
    + * class (the socket thread and the Request generating thread). Synchronization
    + * is simple with the map being the only thing that is protected. Everything
    + * else works via Atomic variables.
    -public class CoordinationQueue {
    -  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(CoordinationQueue.class);
    +class RequestIdMap {
    +  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RequestIdMap.class);
    +  private final AtomicInteger value = new AtomicInteger();
    --- End diff --
    How about `coordinationIdCounter` and `isOpen`?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message