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

Transaction with FlushDB:DeleteRange unsupported in WriteBatchWithIndex #2326

Closed
1 of 2 tasks
PokIsemaine opened this issue May 23, 2024 · 0 comments
Closed
1 of 2 tasks
Labels
bug type bug

Comments

@PokIsemaine
Copy link
Contributor

PokIsemaine commented May 23, 2024

Search before asking

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

Version

unstable:commit 9b1ebcd

Minimal reproduce step

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

What did you expect to see?

Redis:

# redis-cli
127.0.0.1:6379> MULTI
OK
127.0.0.1:6379(TX)> SET key 123
QUEUED
127.0.0.1:6379(TX)> FLUSHDB
QUEUED
127.0.0.1:6379(TX)> EXEC
1) OK
2) OK
127.0.0.1:6379> GET key
(nil)
127.0.0.1:6379>

What did you see instead?

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

Anything Else?

I discovered this issue while trying to solve #2310. One of my solutions in issue-2310 was to imitate the current transaction implementation and use WriteBatchWithIndex

issue-2310
2. Get WriteBatchWithIndex in GetWriteBatchBase, but I found that WriteBatchWithIndex cannot support all operations of WriteBatch, such as DeleteRange. Even after using WriteBatchWithIndex::GetWriteBatch after DeleteRange, we cannot index the effect of DeleteRange in Batch through GetFromBatchAndDB.

So I'm currently trying another approach in issue-2310

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@PokIsemaine PokIsemaine added the bug type bug label May 23, 2024
@PokIsemaine PokIsemaine closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
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

1 participant