Skip to content

Commit

Permalink
[FAB-4118] Do not log PullResponse content
Browse files Browse the repository at this point in the history
The pull response might contain a huge amount of data since
it contains blocks. We shouldn't print it, but instead just
print the amount of items in the response.

Change-Id: I74df07bb776d3beb45480579c4ecd8cb0df9f849
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed May 30, 2017
1 parent c520e53 commit ccc4ef8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gossip/gossip/pull/pullstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ func (p *pullMediatorImpl) HandleMessage(m proto.ReceivedMessage) {
return
}
msg := m.GetGossipMessage()

msgType := msg.GetPullMsgType()
if msgType != p.config.MsgType {
return
Expand Down Expand Up @@ -262,7 +261,7 @@ func (p *pullMediatorImpl) Hello(dest string, nonce uint64) {
},
}

p.logger.Debug("Sending hello to", dest)
p.logger.Debug("Sending", p.config.MsgType, "hello to", dest)
p.Sndr.Send(helloMsg.NoopSign(), p.peersWithEndpoints(dest)...)
}

Expand All @@ -281,7 +280,8 @@ func (p *pullMediatorImpl) SendDigest(digest []string, nonce uint64, context int
},
},
}
p.logger.Debug("Sending digest", digMsg.GetDataDig().Digests)
remotePeer := context.(proto.ReceivedMessage).GetConnectionInfo()
p.logger.Debug("Sending", p.config.MsgType, "digest:", digMsg.GetDataDig().Digests, "to", remotePeer)
context.(proto.ReceivedMessage).Respond(digMsg)
}

Expand Down Expand Up @@ -327,7 +327,8 @@ func (p *pullMediatorImpl) SendRes(items []string, context interface{}, nonce ui
},
},
}
p.logger.Debug("Sending", returnedUpdate, "to")
remotePeer := context.(proto.ReceivedMessage).GetConnectionInfo()
p.logger.Debug("Sending", len(returnedUpdate.GetDataUpdate().Data), p.config.MsgType, "items to", remotePeer)
context.(proto.ReceivedMessage).Respond(returnedUpdate)
}

Expand Down

0 comments on commit ccc4ef8

Please sign in to comment.