-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
[Bug]: ExpireAfter might not expire the most recent item. #716
Comments
It looks like a more direct workaround would be to supply the
As for a fix, both mechanisms use the same |
Actually, ignore me. You specifically referenced the I'm gonna go ahead and take the same approach here as I did for |
* Fixed potential infinite-looping in the "SchedulerIsInaccurate" ExpireAfter tests. Reworked stress-testing for ExpireAfter operators, to better ensure that multi-threading contentions are occurring. Added test coverage for "Moved" changes, on the cache stream version of ExpireAfter. Added test coverage for "RemoveRange" changes, on the list version of ExpireAfter. * Enhanced benchmarks for ExpireAfter operators to improve code coverage and include actual expiration behavior. Really, just copied the stress-testing code from tests. Also bumped the .Benchmarks project to .NET 8, to match .Tests. * Re-designed ExpireAfter operators, from scratch, eliminating a variety of defects, including #716.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug 🐞
When using ExpireAfter without polling but scheduling expiry action for each item, the most recent item might get stuck, if the scheduler fires a microsecond earlier then that item's due time. I had to work around it by wrapping the scheduler and adding a millisecond to the dueTime (works for my "slow" trading app :) ).
Step to reproduce
Reproduction repository
https://github.com/reactivemarbles/DynamicData/
Expected behavior
There should be no output
Screenshots 🖼️
Sample output:
Missed: 2 Count: 1
Missed: 6 Count: 1
Missed: 7 Count: 1
This proves that adding new item will expire the previous and sometimes! the new one.
IDE
No response
Operating system
Happened on Mac and Linux container
Version
No response
Device
No response
DynamicData Version
7.14.2
Additional information ℹ️
No response
The text was updated successfully, but these errors were encountered: