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

move expiration logic inside DB impl #89

Merged
merged 3 commits into from
Dec 21, 2021

Conversation

axblueblader
Copy link
Member

@axblueblader axblueblader commented Dec 20, 2021

Fixes #57

changes:
[x] move expiration logic to DB impl, remove ExpirationManager completely
[x] swap appropriate chroniclemap 'get' and 'put' calls to use internal calls instead
[x] apply same logic for onheap

Need help review if any of newly added commands suppose to use 'this' function (has expiration logic) instead of calling pure 'map' functions and vice versa

basically if a command is suppose to completely replace a value at a key with a different value (SET, MSET, DEL) then it should have expiration logic, commands that attempts to alter value (INCR, LPUSH, HSET) doesn't change expiration timestamp

https://redis.io/commands/expire

@tuhuynh27
Copy link
Member

Should we add the same logic for OnHeapImpl @axblueblader

replace chronicleMap.put with this.put only for command that 'replace' the value present
Copy link
Member

@tuhuynh27 tuhuynh27 left a comment

Choose a reason for hiding this comment

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

LGTM

@axblueblader axblueblader merged commit 1386ef0 into master Dec 21, 2021
@axblueblader axblueblader mentioned this pull request Dec 21, 2021
@tuhuynh27 tuhuynh27 deleted the bugfix/57-move-expire-to-db branch December 22, 2021 00:12
@tuhuynh27 tuhuynh27 mentioned this pull request Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move passive expiration logic to DB Class
3 participants