当前位置:网站首页>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边栏推荐
- rpc-remote procedure call demo
- dmp(dump)转储文件
- Regular expression to match a certain string in the middle
- .NET Application -- Helloworld (C#)
- Cloud Native (32) | Introduction to Platform Storage System in Kubernetes
- Summary of domestic environments supported by SuperMap
- 627. Change of gender
- Linux下常见的开源数据库,你知道几个?
- tree table lookup
- leetcode - symmetric binary tree
猜你喜欢

Bubble Sort and Quick Sort

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

Is your data safe in this hyperconnected world?

ASP.NET应用程序--Hello World

【 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

.NET Application -- Helloworld (C#)

引领数字医学高地,中山医院探索打造未来医院“新范式”

如何在WordPress中添加特定类别的小工具

CPDA|How Operators Learn Data Analysis (SQL) from Negative Foundations

The usage of try...catch and finally in js
随机推荐
CPDA|How Operators Learn Data Analysis (SQL) from Negative Foundations
dmp(dump)转储文件
人人都在说的数据中台,你需要关注的核心特点是什么?
Syntax basics (variables, input and output, expressions and sequential statements)
The design idea of DMicro, the Go microservice development framework
Use SuperMap iDesktopX data migration tool to migrate map documents and symbols
北斗三号短报文终端露天矿山高边坡监测方案
Snapback - same tree
语法基础(变量、输入输出、表达式与顺序语句)
The Tanabata copywriting you want has been sorted out for you!
1873. The special bonus calculation
Cybersecurity and the Metaverse: Identifying Weak Links
View handler stepping record
Lexicon - the maximum depth of a binary tree
Distributed systems revisited: there will never be a perfect consistency scheme...
Images using redis cache Linux master-slave synchronization server hard drive full of moved to the new directory which points to be modified
Tencent Cloud [Hiflow] New Era Automation Tool
leetcode - a subtree of another tree
The pit of std::string::find return value
How Jin Cang database correctness verification platform installation file