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?


---

Reply via email to