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

refactor(anvil): flip filter expiration timestamp #2694

Merged
merged 2 commits into from
Aug 10, 2022

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Aug 10, 2022

Motivation

flip logic how filters are evicted, instead of now they now store their expiration deadline.

this is the only time we use Instant::now -Duration but is unlikely the reason for #2685
Ther was an tokio::time::interval that internally uses substraction

apparently there can be some inconsitencies with Instant + Systemtimestamp+ system boot: rust-lang/rust#48980

Solution

convert now - dur to now + dur

Closes #2685

  • use interval_at instead of interval

@mattsse mattsse added L-ignore Log: ignore PR in changelog C-anvil Command: anvil labels Aug 10, 2022
@mattsse mattsse merged commit e2c96c0 into foundry-rs:master Aug 10, 2022
iFrostizz pushed a commit to iFrostizz/foundry that referenced this pull request Nov 9, 2022
* refactor(anvil): flip filter expiration timestamp

* fix: use interval_at
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil L-ignore Log: ignore PR in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

anvil 'tokio-runtime-worker' panicked at 'overflow when subtracting duration from instant
2 participants