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

Tracking Issue: Towards a more redis-compatible database #1942

Open
21 of 24 tasks
PragmaTwice opened this issue Dec 18, 2023 · 10 comments · Fixed by #2244
Open
21 of 24 tasks

Tracking Issue: Towards a more redis-compatible database #1942

PragmaTwice opened this issue Dec 18, 2023 · 10 comments · Fixed by #2244
Labels

Comments

@PragmaTwice
Copy link
Member

PragmaTwice commented Dec 18, 2023

In order to be more compatible with redis, here are commands that exist in Redis (excluding Redis Stack) but are not supported in Kvrocks:

We very much welcome anyone to claim the tasks and start to contribute to Kvrocks. If you need any help during the contribution process, you can leave a message under the corresponding issue.

Also, the parts of existing commands that are incompatible with redis are worthy of attention and welcome any contribution.

It succeed #595.

@PragmaTwice PragmaTwice converted this from a draft issue Dec 18, 2023
@PragmaTwice PragmaTwice changed the title Towards a more redis-compatible database Tracking Issue: Towards a more redis-compatible database Dec 18, 2023
@tisonkun
Copy link
Member

Test suite in other client impl can help.

We writes C++ unit tests and Golang cases with redis-go. IIRC redis-go runs regression tests for Kvrocks also.

I tried Redisson but still have some troubles - #1912

Perhaps also other clients in https://redis.io/resources/clients/

@PragmaTwice PragmaTwice pinned this issue Dec 18, 2023
@jihuayu
Copy link
Member

jihuayu commented Jan 3, 2024

We can add support for BITOPS command BIT/BYTE option

@git-hulk
Copy link
Member

git-hulk commented Jan 3, 2024

@jihuayu done

@judahrand
Copy link

One command which would be amazing to have would be: CLIENT TRACKING (https://redis.io/docs/latest/commands/client-tracking/). redis-py just added support for easily setting up a cache which is automatically invalidated by Redis and it would be incredible if KvRocks could do this too.

@PragmaTwice
Copy link
Member Author

One command which would be amazing to have would be: CLIENT TRACKING (https://redis.io/docs/latest/commands/client-tracking/). redis-py just added support for easily setting up a cache which is automatically invalidated by Redis and it would be incredible if KvRocks could do this too.

Yeah client-side caching is in our roadmap. cc @git-hulk

@git-hulk
Copy link
Member

git-hulk commented Oct 9, 2024

Yes, one obstacle we need to overcome is knowing if a key has expired.

@PragmaTwice
Copy link
Member Author

Yes, one obstacle we need to overcome is knowing if a key has expired.

For me I think we can move the responsibility of expiration detection from the server to clients. i.e. clients should store the key-value cache as well as the TTL.

@git-hulk
Copy link
Member

git-hulk commented Oct 9, 2024

Yes, one obstacle we need to overcome is knowing if a key has expired.

For me I think we can move the responsibility of expiration detection from the server to clients. i.e. clients should store the key-value cache as well as the TTL.

For Redis client-side caching, it will send an invalid message notification once it's expired or evicted due to the memory policy. I'm not sure whether most SDKs will add a default TTL for keys or not. If yes, it should be fine. Or it should be a problem since the expiration needs to depend on the compaction timing.

@PragmaTwice
Copy link
Member Author

PragmaTwice commented Oct 9, 2024

Yes, one obstacle we need to overcome is knowing if a key has expired.

For me I think we can move the responsibility of expiration detection from the server to clients. i.e. clients should store the key-value cache as well as the TTL.

For Redis client-side caching, it will send an invalid message notification once it's expired or evicted due to the memory policy. I'm not sure whether most SDKs will add a default TTL for keys or not. If yes, it should be fine. Or it should be a problem since the expiration needs to depend on the compaction timing.

It's hard for kvrocks to send notifications on expiration, but for any other writing we can notify, of course. We need to state this point to client implementations to let them store the TTL.

It's also recommended in the Redis documentation for client implementation hints:

Handling TTLs: make sure you also request the key TTL and set the TTL in the local cache if you want to support caching keys with a TTL.

@git-hulk
Copy link
Member

git-hulk commented Oct 9, 2024

It's also recommended in the Redis documentation for client implementation hints:

Yes, that makes sense. I will go through the Redis server and its SDK implementation for client-side caching when I get time. And then propose a discussion or design.

@Yangsx-1 Yangsx-1 unpinned this issue Dec 4, 2024
@Yangsx-1 Yangsx-1 pinned this issue Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

5 participants