Skip to content

Conversation

gbrodman
Copy link
Collaborator

@gbrodman gbrodman commented Oct 15, 2025

Basically, what happened is that the cache's expireAfterWrite was being called some number of milliseconds (say, 50) after the transaction was started. That method used the transaction time instead of the current time, so as a result the entries were sticking around 50ms longer in the cache than they should have been.

This fix contains two parts, each of which I believe would be sufficient on their own to fix the issue:

  1. Use the currentTime passed in in Expiry::expireAfterCreate
  2. Use the transaction time in the cache's Ticker. This keeps everything on the same schedule.

This change is Reviewable

Basically, what happened is that the cache's expireAfterWrite was being
called some number of milliseconds (say, 50-100) after the transaction
was started. That method used the transaction time instead of the
current time, so as a result the entries were sticking around 50-100ms
longer in the cache than they should have been.

This fix contains two parts, each of which I believe would be sufficient
on their own to fix the issue:
1. Use the currentTime passed in in Expiry::expireAfterCreate
2. Use the transaction time in the cache's Ticker. This keeps everything
   on the same schedule.
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.

1 participant