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

Can't delete key currently in DragonflyDB via RIOT #150

Open
nickyulai opened this issue Jul 1, 2024 · 0 comments
Open

Can't delete key currently in DragonflyDB via RIOT #150

nickyulai opened this issue Jul 1, 2024 · 0 comments

Comments

@nickyulai
Copy link

nickyulai commented Jul 1, 2024

Somehow, I need to migrate Redis data to DragonflyDB. Therefore, I am trying to use the riot source replicate target --mode live command locally, where the source is the Redis server and the target is the DragonflyDB server. When I delete a key in the Redis server in real-time, the corresponding key in DragonflyDB is not deleted. Below is my console test output.

riot command

docker run --network default fieldengineering/riot --host redis -p 6379 --db 1 replicate --host dragonfly -p 6380 --db 1 --mode live

At the same time, monitor changes to Redis keys and values in real time

redis-cli config set notify-keyspace-events KEA

redis-cli --csv psubscribe '__keyspace@1__:*'

Use python to test

from redis import Redis

r1 = Redis.from_url("redis://redis:6379/1") # source
r2 = Redis.from_url("redis://dragonfly:6380/1") # target

r1.set("aaa", 123)
-> True
r1.get("aaa")
-> 123
r2.get("aaa")
-> 123

r1.delete("aaa")
-> 1
r1.get("aaa")
-> None
r2.get("aaa")
-> 123

And there is a del event in Redis server

root@b78eda5b1c0e:/data# redis-cli --csv psubscribe '__keyspace@1__:*'
Reading messages... (press Ctrl-C to quit)
"psubscribe","__keyspace@1__:*",1
"pmessage","__keyspace@1__:*","__keyspace@1__:aaa","set"
"pmessage","__keyspace@1__:*","__keyspace@1__:aaa","del"

There is an increase in the RIOT listener:

[SimpleAsyncTaskExecutor-1] INFO com.redis.riot.redis.Replication$LoggingWriteListener - Wrote aaa
Listening  ? % [ =            ] 1/? (0:00:26 / ?) .0/s | queue capacity: 10,000[SimpleAsyncTaskExecutor-1] INFO com.redis.riot.redis.Replication$LoggingWriteListener - Wrote aaa
Listening  ? % [  =           ] 2/? (0:00:30 / ?) .1/s | queue capacity: 10,000

But the result is not correct. Does anyone know what happened or what I am doing wrong in my test?

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

No branches or pull requests

1 participant