Comments (2)
检查了一下,感觉我写的没有错误。你给的引用文档可能较老,没有 64 byte 的数值类型,参考 Redis 的代码:
int rdbLoadLenByRef(rio *rdb, int *isencoded, uint64_t *lenptr) {
unsigned char buf[2];
int type;
if (isencoded) *isencoded = 0;
if (rioRead(rdb,buf,1) == 0) return -1;
type = (buf[0]&0xC0)>>6;
if (type == RDB_ENCVAL) {
/* Read a 6 bit encoding type. */
if (isencoded) *isencoded = 1;
*lenptr = buf[0]&0x3F;
} else if (type == RDB_6BITLEN) {
/* Read a 6 bit len. */
*lenptr = buf[0]&0x3F;
} else if (type == RDB_14BITLEN) {
/* Read a 14 bit len. */
if (rioRead(rdb,buf+1,1) == 0) return -1;
*lenptr = ((buf[0]&0x3F)<<8)|buf[1];
} else if (buf[0] == RDB_32BITLEN) {
/* Read a 32 bit len. */
uint32_t len;
if (rioRead(rdb,&len,4) == 0) return -1;
*lenptr = ntohl(len);
} else if (buf[0] == RDB_64BITLEN) {
/* Read a 64 bit len. */
uint64_t len;
if (rioRead(rdb,&len,8) == 0) return -1;
*lenptr = ntohu64(len);
} else {
rdbReportCorruptRDB(
"Unknown length encoding %d in rdbLoadLen()",type);
return -1; /* Never reached. */
}
return 0;
}
看你的 debug 信息,firstByte = %x 输出为 81,转为 10 进制则为 129,属于 RDB_64BITLEN,应该就是一个大数。
目前怀疑,是你的 RDB 中确实存在一个大 lenght,但是 shake 某些 buffer 大小不够导致错误。
方便的话发我 dump.rdb 文件分析一下。
from redisshake.
已找到原因, 源端有使用redissearch module, 现在RedisShake不支持RedisSearch的RDB解码
from redisshake.
Related Issues (20)
- scan同步方式是否会丢失数据 HOT 1
- 数据传输过程中,报[ERR MULTI calls can not be nested] HOT 2
- sync always hand shaking HOT 1
- redis 4.0.14 同步到 6.2.7 数据不一致 HOT 7
- 运行过程中大概有5分钟的时间,read_ops/write_ops都是0,最后任务失败退出 HOT 2
- 自建Redis与云Redis同步异常 HOT 2
- RedisShake 3.1.11 从4.0.11同步到6.0.14,key数量对不上 HOT 2
- RedisShake 4.x支持断点续传吗 HOT 2
- 使用redis-shake做增量数据同步的时候,有很多warn的信息,我不确认会不会因为这些问题导致我数据不一致 HOT 2
- 同步数据较慢 HOT 3
- 通过nat转换进行同步报 i/o timeout HOT 1
- scan_reader模式不能直接同步增量? HOT 3
- can_reader模式同步过程中报:ERR unexpected EOF HOT 1
- redis6同步支持 HOT 1
- 4.05版本使用sync_reader模式连接阿里云Redis集群版直连地址报错 HOT 15
- RedisShake 4.x 初次单机迁移到集群Key丢失以及scan数量与keyspace数量差异问题 HOT 6
- 最新的4.10版本,设置了scan = false不起作用 HOT 2
- ERR NOAUTH Authentication required [redis_writer] sentinel=true HOT 3
- ERR The ID specified in XADD is equal or smaller than the target stream top item HOT 8
- sync_rdb设为false之后依然拉取全量rdb文件发给slave HOT 4
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 redisshake.