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

Unable to set document expiration longer than ~50 days in the future #1029

Closed
borrrden opened this issue May 31, 2018 · 0 comments
Closed

Unable to set document expiration longer than ~50 days in the future #1029

borrrden opened this issue May 31, 2018 · 0 comments
Assignees
Milestone

Comments

@borrrden
Copy link
Member

The issue is that when document expiration is set, a timer is created to run the purge job at the interval that is determined by calculating the next expiring document. If the next document is greater than 2^32-1 seconds in the future, then the timer will throw an exception being unable to schedule itself.

Library Version

1.4.1

.NET Runtime

All

Operating System / Device Details

Any

Log Output

An exception starting with either ExpireAt or ExpireAfter and ending at the Change method of the .NET timer (System.ArgumentOutOfRangeException). Furthermore, this information is saved and causes inability to open the database until the interval is less than the max allowed.

Expected behavior

No exceptions, and the TTL behaving properly.

Actual behavior

The exception described above

Steps To Reproduce

  1. Get a document from the database
  2. Call ExpireAfter with TimeSpan.Days(60) or thereabouts

Reproduction Project

None

@borrrden borrrden added this to the 1.4.2 milestone May 31, 2018
@borrrden borrrden self-assigned this May 31, 2018
@djpongh djpongh modified the milestones: 1.4.2, 1.4.4 Jul 10, 2018
borrrden added a commit that referenced this issue Jul 27, 2018
@pasin pasin removed the backlog label Jul 27, 2018
@djpongh djpongh added the bug label Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants