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

ASF GitHub Bot commented on GEODE-3406:
---------------------------------------

Github user pivotal-amurmann commented on a diff in the pull request:

    https://github.com/apache/geode/pull/716#discussion_r133844781
  
    --- Diff: 
geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
 ---
    @@ -334,42 +342,46 @@ protected void run() {
        * fix for bug 33711 - client requests are spun off to another thread 
for processing. Requests are
        * synchronized in processGossip.
        */
    -  private void processRequest(final Socket sock) {
    +  private void processRequest(final Socket socket) {
         executor.execute(() -> {
           long startTime = DistributionStats.getStatTime();
           DataInputStream input = null;
           Object request, response;
           try {
     
    -        sock.setSoTimeout(READ_TIMEOUT);
    -        getSocketCreator().configureServerSSLSocket(sock);
    +        socket.setSoTimeout(READ_TIMEOUT);
    +        getSocketCreator().configureServerSSLSocket(socket);
     
             try {
    -          input = new DataInputStream(sock.getInputStream());
    +          input = new DataInputStream(socket.getInputStream());
             } catch (StreamCorruptedException e) {
               // Some garbage can be left on the socket stream
               // if a peer disappears at exactly the wrong moment.
               log.debug("Discarding illegal request from "
    -              + (sock.getInetAddress().getHostAddress() + ":" + 
sock.getPort()), e);
    +              + (socket.getInetAddress().getHostAddress() + ":" + 
socket.getPort()), e);
               return;
             }
    -        int gossipVersion = readGossipVersion(sock, input);
    +        int gossipVersion = readGossipVersion(socket, input);
     
             short versionOrdinal;
    +        if (gossipVersion == NON_GOSSIP_REQUEST_VERSION) {
    +          if (input.readUnsignedByte() == 
AcceptorImpl.PROTOBUF_CLIENT_SERVER_PROTOCOL
    +              && Boolean.getBoolean("geode.feature-protobuf-protocol")) {
    +            ClientProtocolMessageHandler messageHandler = 
ClientProtocolMessageHandlerLoader.load();
    --- End diff --
    
    I would really like to have this constant only defined once. Agreed that 
AcceptorImpl is a bad spot for that. What would be a good spot?


> Enable new flow for protocol on locators
> ----------------------------------------
>
>                 Key: GEODE-3406
>                 URL: https://issues.apache.org/jira/browse/GEODE-3406
>             Project: Geode
>          Issue Type: Sub-task
>          Components: client/server
>            Reporter: Brian Baynes
>            Assignee: Alexander Murmann
>
> Enable magic byte and new flow for new protocol on locators.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to