当前位置:网站首页>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
边栏推荐
- View handler stepping record
- word分栏小记
- Question about #sql shell#, how to solve it?
- Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors
- How to sort multiple fields and multiple values in sql statement
- 论治理与创新,2022 开放原子全球开源峰会 OpenAnolis 分论坛圆满落幕
- 1667. Fix names in tables
- QStyle平台风格
- A small tool to transfer files using QR code - QFileTrans 1.2.0.1
- Talking about data security governance and privacy computing
猜你喜欢
Countdown to 2 days|Cloud native Meetup Guangzhou Station, waiting for you!
The linear table lookup
View handler stepping record
In 2022, you still can't "low code"?Data science can also play with Low-Code!
.NET应用程序--Helloworld(C#)
2022-08-04: Input: deduplicated array arr, the numbers in it only contain 0~9.limit, a number.Return: The maximum number that can be spelled out with arr if the requirement is smaller than limit.from
【已解决】Unity Coroutinue 协程未有效执行的问题
Use SuperMap iDesktopX data migration tool to migrate ArcGIS data
【 genius_platform software platform development 】 : seventy-six vs the preprocessor definitions written cow force!!!!!!!!!!(in the other groups conding personnel told so cow force configuration to can
How Jin Cang database correctness verification platform installation file
随机推荐
腾讯云【Hiflow】新时代自动化工具
tree table lookup
为什么pca分量没有关联
人人都在说的数据中台,你需要关注的核心特点是什么?
2022了你还不会『低代码』?数据科学也能玩转Low-Code啦!
sql server 安装提示用户名不存在
1484. Sell Products by Date
通过模拟Vite一起深入其工作原理
AI+PROTAC | dx/tx completes $5 million seed round
How OpenGL works
Syntax basics (variables, input and output, expressions and sequential statements)
1484. 按日期分组销售产品
Is your data safe in this hyperconnected world?
1667. Fix names in tables
Chinese characters to Pinyin
STM32 uses stm32cubemx LL library series tutorial
leetcode - a subtree of another tree
mysql没法Execute 大拿们求解
【Daily Training】1403. Minimum Subsequence in Non-Increasing Order
解决端口占用问题 Port xxxx was already in use