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

kvrocks2redis can't sync flush commands #2177

Open
1 of 2 tasks
iushas opened this issue Mar 18, 2024 · 6 comments
Open
1 of 2 tasks

kvrocks2redis can't sync flush commands #2177

iushas opened this issue Mar 18, 2024 · 6 comments
Labels
bug type bug

Comments

@iushas
Copy link

iushas commented Mar 18, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

unstable 70fac37 Fri Feb

Minimal reproduce step

image

master -> slave -> kvrocks2redis -> target

1、master flush
2、aof only write one del command

What did you expect to see?

write flushcommand to aof file

What did you see instead?

aof only write one del command

Anything Else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@iushas iushas added the bug type bug label Mar 18, 2024
@git-hulk
Copy link
Member

@iushas Thanks for your report, will take a look soon.

@iushas
Copy link
Author

iushas commented Mar 18, 2024

@iushas Thanks for your report, will take a look soon.

image
if put kvrocks2redis with master node ,result is In line with expectations ,all namespace aof file generate one flushdb command

@git-hulk
Copy link
Member

Got your point, that said this issue only happened while syncing from the replica node and works well in the master node.

@iushas
Copy link
Author

iushas commented Mar 18, 2024

Got your point, that said this issue only happened while syncing from the replica node and works well in the master node.

yes, Not sure if there are any other commands that would have this problem

@git-hulk
Copy link
Member

Got your point, that said this issue only happened while syncing from the replica node and works well in the master node.

yes, Not sure if there are any other commands that would have this problem

It's caused by the rocksdb's DeleteRange API which we didn't implement the batch extractor. And for parsing from the master node should have the same issue, guess the FLUSHDB you seen is the kvrocks2redis will send the FLUSHDB command first before parsing the full DB.

AFAIK, the DeleteRange API is only used in FLUSHDB/FLUSHALL command, so it should only affect those two.

@PokIsemaine
Copy link
Contributor

PokIsemaine commented May 23, 2024

MULTI/EXEC has the same problem

127.0.0.1:6666> MULTI
OK
127.0.0.1:6666> SET key 123
QUEUED
127.0.0.1:6666> FLUSHDB
QUEUED
127.0.0.1:6666> EXEC
1) OK
2) (error) ERR Not implemented: DeleteRange unsupported in WriteBatchWithIndex

ERR Not implemented: DeleteRange unsupported in WriteBatchWithIndex
rocksdb ref: https://github.com/facebook/rocksdb/blob/c72ee4531b288bf08b9414155fafb86cc4378fb4/include/rocksdb/utilities/write_batch_with_index.h#L165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type bug
Projects
None yet
Development

No branches or pull requests

3 participants