当前位置:网站首页>Thinking (88): Use protobuf custom options for multi-version management of data
Thinking (88): Use protobuf custom options for multi-version management of data
2022-08-05 03:06:00 【fananchong2】
Data multi-version management
In the production environment of the project, the data is iterated for many times, and the data structure may also be expanded.
There needs to be a way to identify such changes and to do data version upgrades and other requirements
Common ideas, such as: the data in the DB has a version number, and the data structure definition in the code also determines the latest version in some way
Recently seen a more elegant way also available in Etcd
I did the next exercise for reference, and recorded one or two
Entry Multiversion Management for WAL in Etcd
Entry in the WAL file in the Etcd version iteration, resulting in changes to the data structure as the version iterates
Etcd has such a requirement: when the Entry version in its own code is lower than that in the WAL file, it is regarded as an error and the service is closed
Etcd uses protobuf customization options to achieve multi-version definition of Entry
For example:
enum EntryType {option (versionpb.etcd_version_enum) = "3.0";EntryNormal = 0;EntryConfChange = 1; // corresponds to pb.ConfChangeEntryConfChangeV2 = 2 [(versionpb.etcd_version_enum_value)="3.4"]; // corresponds to pb.ConfChangeV2}message Entry {option (versionpb.etcd_version_msg) = "3.0";optional uint64 Term = 2 [(gog边栏推荐
- [Storage] Dawning Storage DS800-G35 ISCSI maps each LUN to the server
- Tencent Cloud [Hiflow] New Era Automation Tool
- A small tool to transfer files using QR code - QFileTrans 1.2.0.1
- Is your data safe in this hyperconnected world?
- Apache DolphinScheduler, a new generation of distributed workflow task scheduling platform in practice - Medium
- Data to enhance Mixup principle and code reading
- The Tanabata copywriting you want has been sorted out for you!
- Countdown to 2 days|Cloud native Meetup Guangzhou Station, waiting for you!
- dmp(dump)转储文件
- 金仓数据库如何验证安装文件平台正确性
猜你喜欢

金仓数据库如何验证安装文件平台正确性

Compressed storage of special matrices

【已解决】Unity Coroutinue 协程未有效执行的问题

Simple description of linked list and simple implementation of code

dmp(dump)转储文件

The design idea of DMicro, the Go microservice development framework

Apache DolphinScheduler, a new generation of distributed workflow task scheduling platform in practice - Medium

Everyone in China said data, you need to focus on core characteristic is what?

Flink 1.15.1 Cluster Construction (StandaloneSession)

Matlab drawing 3
随机推荐
[Storage] Dawning Storage DS800-G35 ISCSI maps each LUN to the server
[Fortune-telling-60]: "The Soldier, the Tricky Way"-2-Interpretation of Sun Tzu's Art of War
Beidou no. 3 short message terminal high slope in open-pit mine monitoring programme
语法基础(变量、输入输出、表达式与顺序语句完成情况)
Compressed storage of special matrices
2022高处安装、维护、拆除考试题模拟考试题库及在线模拟考试
引领数字医学高地,中山医院探索打造未来医院“新范式”
毕设-基于SSM房屋租赁管理系统
大像素全景制作完成后,推广方式有哪些?
undo问题
Step by step how to perform data risk assessment
The linear table lookup
Object.defineProperty monitors data changes in real time and updates the page
QT MV\MVC structure
private package
【七夕节】浪漫七夕,代码传情。将爱意变成绚烂的立体场景,给她(他)一个惊喜!(送代码)
【滤波跟踪】基于matlab无迹卡尔曼滤波惯性导航+DVL组合导航【含Matlab源码 2019期】
.NET应用程序--Helloworld(C#)
dmp (dump) dump file
mysql can't Execute, please solve it