-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove want-block sent tracking from sessionWantSender #759
base: main
Are you sure you want to change the base?
Conversation
Tracking want-blocks that were sent to a peer is not necessary to do in sessionwantsender. This is already handled in peermanager/peerwantmanager. Removing this tracking reduces unnecessary memory use.
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #759 +/- ##
==========================================
- Coverage 60.46% 60.45% -0.02%
==========================================
Files 245 244 -1
Lines 31133 31101 -32
==========================================
- Hits 18826 18803 -23
+ Misses 10627 10618 -9
Partials 1680 1680
|
// Piggyback some other want-haves onto the request to the peer | ||
for _, c := range sws.getPiggybackWantHaves(p, snd.wantBlocks) { | ||
snd.wantHaves.Add(c) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure removing this has no effect?
swbt was introduced here: ipfs/go-bitswap@b3a47bc#diff-92a0b168d045013a05e87675741bb3cfa356a674c6f1535fbe88fc8e89d31e53
It is not explained what exactly motivated it, but it sounds like it is somehow keeping track of some wants that would otherwise not be sent?
Tracking want-blocks that were sent to a peer is not necessary to do in sessionwantsender. This is already handled in peermanager/peerwantmanager.
Removing this tracking reduces unnecessary memory use.