Comments (9)
@AntiTopQuark Thanks for your reply. For the DUMP command, it'd be better to support more Redis versions(at least since from Redis 4.0). And I have changed the RDB version to 6 in PR #2252, this issue should be caused by using the encoding RDB_TYPE_LIST_QUICKLIST_2
for the list which has been supported since Redis 7.0.0. I haven't tested other types like HASH/SET/ZSET yet, but I guess those data types should work well.
from kvrocks.
@krizald Thanks for your detailed report. Then I know the root cause now and will fix it when I get time. @AntiTopQuark is also welcome to contribute if you're interested.
from kvrocks.
@AntiTopQuark Very much appreciate your offer. I'm still working on the controller and not start yet. Welcome to take this issue.
from kvrocks.
@krizald Thanks for your report, I can confirm it works well in Redis7 but didn't work in Redis 6. Will investigate the reason while I get time.
from kvrocks.
@krizald Kvrocks now is using RDB_TYPE_LIST_QUICKLIST_2
to dump the list payload which is only supported in Redis7. Needs to change it to RDB_TYPE_LIST_QUICKLIST or RDB_TYPE_LIST encoding, to see if any guys would like to resolve this. If no, I will fix it this weekend.
from kvrocks.
@krizald @git-hulk
I believe that if the result dumped from Redis 7 is in the RDB_TYPE_LIST_QUICKLIST_2
format, restoring it into Redis 6 would encounter the same issue.
The dump and restore commands themselves are inherently incompatible between different RDB versions.
Due to the existence of RDB_VERSION
being encoded into the DUMP payload, Restore
command will check the RDB_VERSION
. The payload dumped in Redis 7 version cannot be used in Redis 6 version.
You can take a look at this code: https://github.com/redis/redis/blob/804110a487f048669aa9d9412e5789ec43f4fe39/src/cluster.c#L107"
The current KVRocks`s RDB_VERSION
is 12, referencing the latest code of Redis.
from kvrocks.
@krizald :"I attached 2 dump files. KV Rocks dump size is way bigger than the Redis one"
Due to the fact that kvrocks does not support some compression encodings, the result of the dump
command will be stored in its native string format, resulting in larger sizes.
from kvrocks.
I tested with the most recent unstable KVRocks and Redis 6,2. String/Hashset/Set are ok. But dumping list is failed, when restore in Redis.
KV Rocks Server Info
# Server
version:unstable
kvrocks_version:unstable
redis_version:4.0.0
git_sha1:51ce175d
Redis Server Info
# Server
redis_version:6.2.10
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:8dfb0984f18c7765
redis_mode:standalone
os:Linux 5.10.0-22-amd64 x86_64
Here is the script I use to test list
redisConn="-p 6381"
kvrocksConn="-p 7381"
keyName="test-list"
redis-cli $redisConn del $keyName
redis-cli $kvrocksConn del $keyName
redis-cli $kvrocksConn lpush $keyName "A"
redis-cli $kvrocksConn lpush $keyName "B"
redis-cli $kvrocksConn lpush $keyName "D"
redis-cli $kvrocksConn --raw dump $keyName | head -c-1 | redis-cli $redisConn -x restore $keyName 0
Error message: (error) ERR Bad data format
from kvrocks.
@krizald Thanks for your detailed report. Then I know the root cause now and will fix it when I get time. @AntiTopQuark is also welcome to contribute if you're interested.
@git-hulk If you haven't started yet, I can accept this task
from kvrocks.
Related Issues (20)
- Investigate the possiblity and method to replace GLOG with spdlog HOT 3
- Data structure desgin documentation of STREAM GROUP HOT 2
- Add support of hash field expiration HOT 1
- Refactor the management of rocksdb ColumnFamily HOT 7
- Add support for Xcode HOT 1
- Memory limits on connections HOT 2
- Enable the new data type encoding by default HOT 2
- Introduce the key encoding version HOT 3
- Make the default namepace name changable HOT 8
- Move the performance benchmark to website HOT 2
- Optimize the implementation of IntervalSet intersection HOT 2
- [Build] Add supports for build kvrocks with UBSAN
- [Tools] Add a git commit hook for clang-format checking HOT 3
- Add option to INFO to return a json payload HOT 13
- should we start the compaction_checker_range thread if it's not configed. HOT 3
- TLS test case seems broken
- Improve consistency and isolation semantics by adding Context parameter to DB API HOT 19
- Improve error handling and logging for Retryable IO Errors HOT 13
- Add support for the TOUCH command HOT 2
- Potential data inconsistency issues? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kvrocks.