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

ASF GitHub Bot commented on ZOOKEEPER-2939:
-------------------------------------------

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

    https://github.com/apache/zookeeper/pull/440#discussion_r163391127
  
    --- Diff: src/java/main/org/apache/zookeeper/server/ZKDatabase.java ---
    @@ -264,19 +262,8 @@ public void addCommittedProposal(Request request) {
                     maxCommittedLog = request.zxid;
                 }
     
    -            ByteArrayOutputStream baos = new ByteArrayOutputStream();
    -            BinaryOutputArchive boa = BinaryOutputArchive.getArchive(baos);
    -            try {
    -                request.getHdr().serialize(boa, "hdr");
    -                if (request.getTxn() != null) {
    -                    request.getTxn().serialize(boa, "txn");
    -                }
    -                baos.close();
    -            } catch (IOException e) {
    -                LOG.error("This really should be impossible", e);
    -            }
    -            QuorumPacket pp = new QuorumPacket(Leader.PROPOSAL, 
request.zxid,
    -                    baos.toByteArray(), null);
    +            byte[] data = SerializeUtils.serializeRequest(request);
    --- End diff --
    
    Is this really apropos to the stated reason for the PR? If not separating 
out to another PR means 1) easier to review this patch, and 2) might be easier 
to get this committed separately rather than tying it to another issue.


> Deal with maxbuffer as it relates to proposals
> ----------------------------------------------
>
>                 Key: ZOOKEEPER-2939
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2939
>             Project: ZooKeeper
>          Issue Type: Sub-task
>          Components: jute, server
>            Reporter: Andor Molnar
>            Assignee: Andor Molnar
>            Priority: Major
>             Fix For: 3.5.4, 3.6.0
>
>
> Monitor real-time Jute buffer usage as it relates to proposals.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to