Skip to content

Commit

Permalink
[FAB-5293] Log buffer overflow events
Browse files Browse the repository at this point in the history
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 <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Jul 16, 2017
1 parent d9c3202 commit 28c8efd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gossip/comm/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ func (conn *connection) send(msg *proto.SignedGossipMessage, onErr func(error))
defer conn.Unlock()

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

Expand Down

0 comments on commit 28c8efd

Please sign in to comment.