bee icon indicating copy to clipboard operation
bee copied to clipboard

evict just enough chunks of a batch to fall below the reserve capacity

Open istae opened this issue 2 years ago • 0 comments

To minimize chunks loss, we should only evict enough chunks fall below the capacity. This can be done by passing a "max evict counter" calculated in the unreserve function and passed to the evict batch function.

The other required change is that the collected items should be sorted by binID first so that the older chunks are evicted first.

Also, we can temporarily disable caching of evicted chunks until a performant and stable solution is found: see https://github.com/ethersphere/bee/issues/4530

istae avatar Jan 12 '24 16:01 istae