zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afine <...@git.apache.org>
Subject [GitHub] zookeeper pull request #412: ZOOKEEPER-2101: Transaction larger than max buf...
Date Mon, 30 Oct 2017 22:10:00 GMT
Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/412#discussion_r147798914
  
    --- Diff: src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java ---
    @@ -905,10 +907,22 @@ protected void pRequest(Request request) throws RequestProcessorException
{
                     request.setTxn(new ErrorTxn(Code.MARSHALLINGERROR.intValue()));
                 }
             }
    +        checkProposalSize(request);
             request.zxid = zks.getZxid();
             nextProcessor.processRequest(request);
         }
     
    +    private void checkProposalSize(Request request) {
    +        if (request.getHdr() == null) return;
    +        byte[] data = SerializeUtils.serializeRequest(request);
    --- End diff --
    
    I'm concerned about possible performance implications here. Are we serializing this request
an extra time here?


---

Mime
View raw message