Skip to content
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

PBjs Core : expire stale bids directly from auction object to prevent long TTL bid #11776

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fowler446
Copy link
Collaborator

@fowler446 fowler446 commented Jun 12, 2024

Type of change

  • [x ] Feature

Description of change

By expiring bids after their TTL has elapsed directly in the auction object we prevent bids with long TTLs from hogging memory. At the moment when there is a long TTL bid in an auction, all the other bids are kept long after their expiry.

Relevant Issue

#11310

entries: () => auctionManager.getNoBids()
}
}).forEach(([t, {bd, entries}]) => {
it(`with ${t} are never dropped if minBidCacheTTL is not set`, () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be better to keep this behavior? expire individual bids the same way auctions are, after Math.max(bid.ttl, getConfig('minBidCacheTTL')), and only if minBidCacheTTL is set. This way pubs can choose whether they want this / they don't have to reason about two different expiration mechanisms.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fowler446 are you still working on this? Can you provide your perspective on this?

@ChrisHuie ChrisHuie changed the title Expire stale bids directly from auction object to prevent long TTL bi… PBjs Core : expire stale bids directly from auction object to prevent long TTL bid Jun 17, 2024
@patmmccann patmmccann linked an issue Jun 30, 2024 that may be closed by this pull request
@dgirardi dgirardi self-assigned this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minBidCacheTTL better memory optimization
4 participants