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

2.x TTL doesn't purge expired documents #1082

Closed
borrrden opened this issue Nov 20, 2018 · 1 comment
Closed

2.x TTL doesn't purge expired documents #1082

borrrden opened this issue Nov 20, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@borrrden
Copy link
Member

Library Version

Iridium

.NET Runtime

All

Operating System / Device Details

All

Log Output

n/a

Expected behavior

An expired document should be purged

Actual behavior

No purge occurs

Steps To Reproduce

  1. Set TTL to something small (e.g. 2 seconds)
  2. Wait for more than the TTL
  3. Observe that the document is still present

Reproduction Project

@borrrden
Copy link
Member Author

@Sandychuang8 I blanked on this when reviewing the PR. When document expiration is set, a timer needs to be set up for the next expiration (unless a timer is already set for a point in time sooner than the new expiration). The timer's job is to then run the LiteCore c4db_purgeExpiredDocs method, and reschedule if there is another document that will be expiring. But be careful not to exceed the maximum allowed time for a timer (see #1029 )

@djpongh djpongh added this to the Iridium milestone Nov 20, 2018
Sandychuang8 pushed a commit that referenced this issue Nov 21, 2018
Sandychuang8 pushed a commit that referenced this issue Dec 6, 2018
@borrrden borrrden removed the review label Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants