-
Notifications
You must be signed in to change notification settings - Fork 95
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
feat: option to not read size of blocks for want-have requests #672
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #672 +/- ##
==========================================
+ Coverage 60.29% 60.33% +0.03%
==========================================
Files 243 243
Lines 30889 30953 +64
==========================================
+ Hits 18624 18674 +50
- Misses 10603 10620 +17
+ Partials 1662 1659 -3
|
See configuration in kubo: ipfs/kubo#10512 |
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.
Our integration tests passed with the option applied. I will test this E2E once the debug log is removed
I tested this E2E, and things have been going smoothly so far. Will see how it works over the weekend. |
The cluster performs correctly, and the nodes are still in sync. We haven't tested for performance improvements or degradations and I think that's an approve from our side. |
bare minimum to make it possible to discover current implicit default by reading godocs
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.
lgtm, pushed cosmetic docs changes (godoc explaining feature bit more + ability to read implicit default via godoc)
@gammazero thanks again, if text looks good to you, free to squash and merge 🚀
Allow configuration of the bitswap server's replace WantHave with WantBlock maximum block size using the Internal.Bitswap.WantHaveReplaceSize config item. This sets the maximum size of a block in bytes up to which we will replace a want-have with a want-block. Setting a size of 0 disables this replacement and means that block sizes are not read for WantHave requests. See ipfs/boxo#672 for more details Updated boxo to version with PR 672 --------- Co-authored-by: Marcin Rataj <[email protected]>
Bumps https://github.com/libp2p/go-libp2p/releases/tag/v0.36.5 and https://github.com/ipfs/boxo/releases/tag/v0.24.0 Both brings changes we need. In particular libp2p/go-libp2p#2980 and ipfs/boxo#672
) * Do not fetch size for WantHave blocks * Option to set replaceHasWithBlockMaxSize * Log if replace logic enabled/disabled * docs: WithWantHaveReplaceSize --------- Co-authored-by: Marcin Rataj <[email protected]>
When the replace-have-with-want-blocks is disabled, the block sizes for blocks corresponding to have-want requests are not read and instead the blockstore is checked only to see if the block is present.
The replace-have-with-want-blocks feature can be disabled using the new
WithReplaceHasWithBlockMaxSize(n)
option which can be used withbitswap.New
. It sets the maximum size of a block in bytes up to which we will replace a want-have with a want-block. Setting a size of 0 disables want-have replacement and means that block sizes are not read for want-have requests.Aims to fix #657