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

Cache/policy/time: Backup next before deleting current list elem #45

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

Sypheos
Copy link
Member

@Sypheos Sypheos commented Oct 28, 2021

What does this PR do?

Fix an issue with the time policy that prevent it from evicting more than one element at a time.

Fixes https://github.com/upfluence/backlog/issues/1086

What are the observable changes?

backup next before deleting current

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation
  • Properly labeled

Additional Notes

Comment on lines 162 to 164
next := e.Next()
p.l.Remove(e)
e = next
Copy link
Member

Choose a reason for hiding this comment

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

can you do that before notifying the cache?

@Sypheos Sypheos merged commit ae9fddf into master Oct 28, 2021
@Sypheos Sypheos deleted the 1086/cache-policy-leak branch October 28, 2021 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants