ipfs / boxo

A set of reference libraries for building IPFS applications and implementations in Go.
https://github.com/ipfs/boxo#readme
Other
181 stars 83 forks source link

Fix wantlist overflow handling to select newer entries. #627

Closed gammazero closed 3 weeks ago

gammazero commented 3 weeks ago

bitswap wantlist overflow handling now selects newer entries when truncating wantlist. This fix prevents the retained portion of the wantlist from filling up with CIDs that the server does not have.

Fixes #527

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 59.83%. Comparing base (dfd4a53) to head (0126d1f).

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #627      +/-   ##
==========================================
+ Coverage   59.79%   59.83%   +0.03%     
==========================================
  Files         238      238              
  Lines       29984    29983       -1     
==========================================
+ Hits        17930    17939       +9     
+ Misses      10434    10427       -7     
+ Partials     1620     1617       -3     
Files Coverage Δ
bitswap/server/internal/decision/engine.go 91.75% <100.00%> (+0.53%) :arrow_up:

... and 12 files with indirect coverage changes

gammazero commented 3 weeks ago

Need different approach. Old entries need to be canceled.