fix(bitswap): filter interests from received messages#822
Merged
Conversation
gammazero
reviewed
Jan 31, 2025
Contributor
gammazero
left a comment
There was a problem hiding this comment.
See suggested changes to avoid allocation.
bitswap/client/internal/sessioninterestmanager/sessioninterestmanager.go
Outdated
Show resolved
Hide resolved
bitswap/client/internal/sessioninterestmanager/sessioninterestmanager.go
Outdated
Show resolved
Hide resolved
gammazero
reviewed
Jan 31, 2025
bitswap/client/internal/sessioninterestmanager/sessioninterestmanager.go
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #822 +/- ##
==========================================
+ Coverage 60.44% 60.48% +0.04%
==========================================
Files 244 244
Lines 31095 31120 +25
==========================================
+ Hits 18794 18823 +29
+ Misses 10621 10619 -2
+ Partials 1680 1678 -2
|
Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
ee671ff to
bf8ed5a
Compare
bf8ed5a to
4ea2f5d
Compare
gammazero
approved these changes
Jan 31, 2025
Member
|
@guillaumemichel, I think it does and should also fix the DOS vector. P.S. This was really an annoying one to figure out. |
Member
|
After this PR, 7adce5f should be the last leak to fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixresource leak by adding a CID to BlockResponseManager only if there a session interested in it.
Follow up to #752
Based on #821
@Wondertan does that address the leak that you are referring to in 70a6503?
cc: @gammazero