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

Support for Redis Expire, ExpireAt, TTL commands. #334

Closed
Jibin-Tomy-Narvar opened this issue Jun 19, 2018 · 3 comments
Closed

Support for Redis Expire, ExpireAt, TTL commands. #334

Jibin-Tomy-Narvar opened this issue Jun 19, 2018 · 3 comments
Assignees
Labels
kind/enhancement This is an enhancement of an existing feature

Comments

@Jibin-Tomy-Narvar
Copy link

Support for EXPIRE command. Which will let the user add TTL after a key was created or will update the current TTL if the key already has one.

Nice to have:
support for TTL command. Which will return the remaining TTL of a key.

Ref:
https://redis.io/commands/expire
https://redis.io/commands/ttl

@kmuthukk kmuthukk added the kind/enhancement This is an enhancement of an existing feature label Jun 19, 2018
@kmuthukk
Copy link
Collaborator

Thanks @Jibin-Tomy-Narvar for this enhancement request. This is something we plan to implement in the near term. Will keep you posted.

@kmuthukk
Copy link
Collaborator

For completeness, as part of this, we should also support EXPIREAT and PTTL

https://redis.io/commands/expireat
https://redis.io/commands/pttl

yugabyte-ci pushed a commit that referenced this issue Sep 7, 2018
… P(Setex))

Summary:
Adding support for various TTL-related commands in Redis. Only in top-level collection or primitive (so not individual elements). Unit tests forthcoming.

Main changes (Sanity-checked but not fully tested):

- When writing TTL, adds new TTL-only to DocDB row with flag.
- When reading value, calls Next() to pass the TTL rows.
- Most writes overwrite TTL, except:
- In commands Incr, IncrBy, SetRange, Append, the TTL is not overwritten.
- Modifying elements of a collection does not change its TTL.
- Details in the "Redis TTL Support" document in the TTL Designs folder of Design Discussions.

Future To-Dos:
- Testing intents with expiration.
- Investigate: If the data type of an element is found in the write cache, and it is not expired, is it safe to assume that data type is accurate? Check the cases where this might not be true.

Test Plan:
C++ Unit Tests:
redisserver_redisserver-test TestRedisService.TestTtlPrimitive, TestTtlHash, TestTtlSet, TestTtlSortedSet, TestTtlModifyNoOverwrite
docdb_docdb-test DocDBTest.RedisTTLCompactionTest, CollectionTTLCompactionTest

Reviewers: rahuldesirazu, mikhail, bogdan, timur, mihnea

Reviewed By: mihnea

Subscribers: pritam.damania, kannan, yql

Differential Revision: https://phabricator.dev.yugabyte.com/D5140
yugabyte-ci pushed a commit that referenced this issue Sep 8, 2018
Summary: Added support for ExpireAt and PExpireAt commands in Redis for completeness.

Test Plan: New unit test in redisserver_redisserver-test at TestRedisService.TestExpireAt

Reviewers: mihnea, rahuldesirazu

Reviewed By: rahuldesirazu

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D5447
@kmuthukk kmuthukk changed the title Support for Redis Expire command. Support for Redis Expire, ExpireAt, TTL commands. Sep 12, 2018
@kmuthukk
Copy link
Collaborator

Implemented in d997a76 and d902325

jasonyb pushed a commit that referenced this issue Jun 11, 2024
PG-354: pg_stat_monitor: Remove pg_stat_monitor_settings view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement This is an enhancement of an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants