Services important for dealing with etcd’s key space include: KV - Creates, updates, fetches, and deletes key-value pairs. Watch - Monitors changes to keys. Lease - Primitives for consuming client keep-alive messages. Services which manage the cluster itself include: Auth - Role based authentication mechanism for authenticating users. Cluster - Provides membership information and configuration facilities. Maintenance - Takes recovery snapshots, defragments the store, and
主要模块 balancer: establish gRPC connections to etcd clusters. API client to sends RPCs to server error handler 历任版本 etcdv3-grpc1.0 使用tcp与所有endpoint保持连接,一直使用一个endpoint直到它close,比
架构图 TreeIndex关键结构 type revision struct { main int64 sub int64 } type generation struct { ver int64 created revision revs []revision } type keyIndex struct { key []byte modified revision generations []generation } BoltDb value的结构: type KeyValue struct { // key is the key in bytes. An empty
mysql 版本:8.0.32 隔离级别 RR 表结构如下: create table t ( id int not null primary key, c int null, d int null ); create index c on t (c); insert into t values(0,0,0),(5,5,5),(10,10,10),(15,15,15),(20,20,20),(25,25,25); | Session A | Session B | |–|–| | begin;|| |select * from t where id>=15 and id<=20 order by id desc