cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dineshjoshi <...@git.apache.org>
Subject [GitHub] cassandra pull request #253: 13630
Date Fri, 07 Sep 2018 06:05:56 GMT
Github user dineshjoshi commented on a diff in the pull request:

    https://github.com/apache/cassandra/pull/253#discussion_r215733539
  
    --- Diff: src/java/org/apache/cassandra/net/async/MessageOutHandler.java ---
    @@ -140,8 +125,17 @@ public void write(ChannelHandlerContext ctx, Object o, ChannelPromise
promise)
     
                 out = ctx.alloc().ioBuffer((int)currentFrameSize);
     
    -            captureTracingInfo(msg);
    -            serializeMessage(msg, out);
    +            @SuppressWarnings("resource")
    +            ByteBufDataOutputPlus outputPlus = new ByteBufDataOutputPlus(out);
    +            msg.message.serialize(outputPlus, targetMessagingVersion, connectionId, msg.id,
msg.timestampNanos);
    +
    +            // next few lines are for debugging ... massively helpful!!
    +            // if we allocated too much buffer for this message, we'll log here.
    +            // if we allocated to little buffer space, we would have hit an exception
when trying to write more bytes to it
    +            if (out.isWritable())
    +                errorLogger.error("{} reported message size {}, actual message size {},
msg {}",
    --- End diff --
    
    How likely are we to cause log spam?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message