Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

avoid copying messages and improve logging #326

Merged
merged 3 commits into from
Mar 26, 2020
Merged

Conversation

Stebalien
Copy link
Member

No description provided.

Copy link
Contributor

@dirkmc dirkmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question but otherwise LGTM 👍, feel free to merge when ready

if err != nil {
// log.Infof("sendblock error: %s", err)
log.Errorf("SendMessage error: %s. size: %d. block-presence length: %d", err, msg.Size(), len(env.Message.BlockPresences()))
log.Debugw("failed to send blocks message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be logged at error level?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failing to send to a peer isn't an error for us. They may just not be reachable.

(this is actually why I started digging into this code, I saw this error in a test)

@Stebalien Stebalien merged commit d39c760 into master Mar 26, 2020
Jorropo pushed a commit to Jorropo/go-libipfs that referenced this pull request Jan 26, 2023
avoid copying messages and improve logging

This commit was moved from ipfs/go-bitswap@d39c760
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants