Skip to content

Commit 23b728f

Browse files
changelog
1 parent ccebb81 commit 23b728f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The following emojis are used to highlight certain changes:
2929
- upgrade to `go-libp2p` [v0.41.1](https://github.com/libp2p/go-libp2p/releases/tag/v0.41.1)
3030
- `bitswap/network`: Add a new `requests_in_flight` metric gauge that measures how many bitswap streams are being written or read at a given time.
3131
- improve speed of data onboarding by batching/bufering provider queue writes [#888](https://github.com/ipfs/boxo/pull/888)
32+
- `provider/queue`: change queue internal buffer from a `Deque` to a `lru.Cache` to deduplicate cids as they are added to the provider queue [#909](https://github.com/ipfs/boxo/pull/909)
3233

3334
### Removed
3435

provider/internal/queue/queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func (q *Queue) commitInput(ctx context.Context, counter uint64, cids *lru.Cache
277277
return fmt.Errorf("failed to create batch: %w", err)
278278
}
279279

280-
oldestCid, _, ok := cids.GetOldest()
280+
oldestCid, _, ok := cids.RemoveOldest()
281281
cstr := makeCidString(oldestCid)
282282
for c := oldestCid; ok; c, _, ok = cids.RemoveOldest() {
283283
key := datastore.NewKey(fmt.Sprintf("%020d/%s", counter, cstr))

0 commit comments

Comments
 (0)