Skip to content

Commit 28c8efd

Browse files
committed
[FAB-5293] Log buffer overflow events
This commit adds a logging event when a message is dropped due to overflow of the connection buffer to a remote peer In case of data blocks, the message that is printed is: 2017-07-16 09:12:55.442 EDT [gossip/comm] send -> DEBU 0c1 Buffer to 9.37.220.210:38346 overflown, dropping message GossipMessage: Channel: [121 97 99 111 118], nonce: 0, tag: CHAN_AND_ORG Block message: {Data: 107690 bytes, seq: 2771}, Envelope: 107714 bytes, Signature: 0 bytes Change-Id: Ibce121be0721a8c8a73f7805a051a28c213d64ba Signed-off-by: yacovm <[email protected]>
1 parent d9c3202 commit 28c8efd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gossip/comm/conn.go

+3
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ func (conn *connection) send(msg *proto.SignedGossipMessage, onErr func(error))
260260
defer conn.Unlock()
261261

262262
if len(conn.outBuff) == util.GetIntOrDefault("peer.gossip.sendBuffSize", defSendBuffSize) {
263+
if conn.logger.IsEnabledFor(logging.DEBUG) {
264+
conn.logger.Debug("Buffer to", conn.info.Endpoint, "overflown, dropping message", msg.String())
265+
}
263266
return
264267
}
265268

0 commit comments

Comments
 (0)