Skip to content

Comments

lru: fix expiry when updating#82

Merged
sergiosalvatore merged 1 commit intovimeo:masterfrom
dfinkel:lru_expiry_update_fix
Feb 10, 2026
Merged

lru: fix expiry when updating#82
sergiosalvatore merged 1 commit intovimeo:masterfrom
dfinkel:lru_expiry_update_fix

Conversation

@dfinkel
Copy link

@dfinkel dfinkel commented Feb 5, 2026

Fix an oversight. When updating an existing value, we forgot to update the expiry.

Fortunately, this wasn't a problem for Galaxycache's main use-case, but, the omitted expiry handling had two issues:

  • We ended up with extra entries in the heap for each update with an expiry.
  • We had the wrong expiration time stored on the entry in the LRU, so it would expire too early independent of the value in the heap.

Fix an oversight. When updating an existing value, we forgot to update
the expiry.

Fortunately, this wasn't a problem for Galaxycache's main use-case, but,
the omitted expiry handling had two issues:
 - We ended up with extra entries in the heap for each update with an
   expiry.
 - We had the wrong expiration time stored on the entry in the LRU, so
   it would expire too early independent of the value in the heap.
@sergiosalvatore
Copy link

Interesting -- Sean, Justin and I were just looking at a potential memory leak where after a day or so, it seemed like GC and garbage collection was getting out of hand. We weren't able to get a profile in time. Perhaps this is related...

Copy link

@sergiosalvatore sergiosalvatore left a comment

Choose a reason for hiding this comment

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

😃

@sergiosalvatore sergiosalvatore merged commit df1970c into vimeo:master Feb 10, 2026
4 checks passed
@dfinkel dfinkel deleted the lru_expiry_update_fix branch February 10, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants