当前位置:网站首页>Collation of errors encountered in the use of redis shake
Collation of errors encountered in the use of redis shake
2022-04-23 15:12:00 【Heavy dust】
Catalog
redis-shake Sort out the errors encountered in use
This article records , I'm using redis-shake Some mistakes encountered
redis-shake decode Error testing
Running redis-shake Of decode The following error occurred during mode , But Baidu and Google can't find the answer , error message :
2022/04/23 09:45:49 [PANIC] parse rdb header error
[error]: EOF
5 github.com/alibaba/RedisShake/pkg/rdb/reader.go:102
github.com/alibaba/RedisShake/pkg/rdb.(*rdbReader).Read
4 io/io.go:328
io.ReadAtLeast
3 io/io.go:347
io.ReadFull
2 github.com/alibaba/RedisShake/pkg/rdb/reader.go:445
github.com/alibaba/RedisShake/pkg/rdb.(*rdbReader).readFull
1 github.com/alibaba/RedisShake/pkg/rdb/loader.go:34
github.com/alibaba/RedisShake/pkg/rdb.(*Loader).Header
0 github.com/alibaba/RedisShake/redis-shake/common/utils.go:953
github.com/alibaba/RedisShake/redis-shake/common.NewRDBLoader.func1
From the error information , Is in github.com/alibaba/RedisShake/redis-shake/common/utils.go
953 Error in line code , But also io Error reading file
This mistake is very strange , Why read rdb File error ? Because of my rdb The file is running redis-shake Of dump The pattern gets
At this time, the author thought redis-shake It's open source. , Pull the official source code for testing , Here is the handle. decode Part of the code is simplified , It's not a complete process , Just go to the wrong place
Sort out the process of file reading , From run redis-shake Pull this from your machine rdb File to test
When I cut out the code , Re running go Program , It was found that there was no error , Read the file normally ; And then again in redis-shake Running on the machine decode Pattern , It's normal
It's really hard to cry or laugh , But later I thought about the reasons for this problem , It should be this rdb File format problem
Because the author later tested rdb The file is actually rerun dump New file generated by pattern , In the beginning rdb The file was generated the day before and run many times dump Covered , May cause some problems
Conclusion
redis-shake Generated rdb Try not to overwrite the file multiple times , It's best to rename each time
Author code
https://github.com/MoGD2018/go-study/tree/main/go-redis-shake-decode
版权声明
本文为[Heavy dust]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231507564800.html
边栏推荐
- SQL中HAVING和WHERE的区别
- 调度系统使用注意事项
- Detailed explanation of C language knowledge points -- first understanding of C language [1] - vs2022 debugging skills and code practice [1]
- Tun model of flannel principle
- Brute force of DVWA low -- > High
- Introduction to Arduino for esp8266 serial port function
- Kubernetes详解(九)——资源配置清单创建Pod实战
- [stc8g2k64s4] introduction of comparator and sample program of comparator power down detection
- Redis cluster principle
- 买卖股票的最佳时机系列问题
猜你喜欢
asp. Net method of sending mail using mailmessage
My raspberry PI zero 2W toss notes to record some problems and solutions
How to design a good API interface?
Introduction to distributed transaction Seata
Basic operation of circular queue (Experiment)
Basic operation of sequential stack
分享 20 个不容错过的 ES6 的技巧
Thread synchronization, life cycle
What is the effect of Zhongfu Jinshi wealth class 29800? Walk with professional investors to make investment easier
thinkphp5+数据大屏展示效果
随机推荐
Leetcode167 - sum of two numbers II - double pointer - bisection - array - Search
8.2 text preprocessing
redis-shake 使用中遇到的错误整理
js——实现点击复制功能
SQL中HAVING和WHERE的区别
The difference between having and where in SQL
tcp_ Diag kernel related implementation 1 call hierarchy
Redis master-slave synchronization
我的树莓派 Raspberry Pi Zero 2W 折腾笔记,记录一些遇到的问题和解决办法
My raspberry PI zero 2W toss notes to record some problems and solutions
Nacos program connects to mysql8 0+ NullPointerException
HJ31 单词倒排
C language super complete learning route (collection allows you to avoid detours)
adobe illustrator 菜單中英文對照
Set onedrive or Google drive as a drawing bed in upic for free
Common interview questions of operating system:
Comparaison du menu de l'illustrateur Adobe en chinois et en anglais
Little red book timestamp2 (2022 / 04 / 22)
Practice of unified storage technology of oppo data Lake
Mysql连接查询详解