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

Fix GC deleting values without expiry #54

Merged
merged 5 commits into from
Mar 18, 2021
Merged

Fix GC deleting values without expiry #54

merged 5 commits into from
Mar 18, 2021

Conversation

hi019
Copy link
Contributor

@hi019 hi019 commented Mar 18, 2021

Fixes #53

@@ -160,16 +160,21 @@ func (s *Storage) Close() error {
return s.db.Close()
}

// Garbage collector to delete expired keys
func (s *Storage) gc() {
// gcTicker starts the gc ticker
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have separated the GC & GC ticker func so that it's easier to test

@hi019 hi019 marked this pull request as ready for review March 18, 2021 19:46
@ReneWerner87 ReneWerner87 merged commit a66230e into main Mar 18, 2021
@ReneWerner87 ReneWerner87 added the ☢️ Bug Something isn't working label Mar 21, 2021
@efectn efectn deleted the fix-expiry-gc branch November 20, 2022 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☢️ Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres - No Expiry not working
2 participants