Real world Rust
- Why and how we use Rust in TiKV- Rust 的类型推导系统和编译检查跨线程传递和共享的对象是否满足 Send + Sync ## TiKV - 大规模分布式 Key-Value 数据库 支持 ACID 跨行事务支持 支持 MVCC 无锁的快照读 构建于 Raft 之上,不依赖分布式文件系统 ☐ 更少的第三方依赖 ☐ 更高的性能(低延迟) - 配合 TiDB 使用, 需要有健全的逻辑实现 SQL 层的下推算子 . 参考 Google percolator 的论文 MVCC ☐ 隔离级别(SI + 乐观锁) ☐ 引擎 RocksDB 水平扩容/缩容 ☐ raft 协议 + PlacementDriver 容错 ## TiKV : MVCC(Multi-version Concurrency Controller),即多版本并发控制,主要解决的是并发读写时的冲突问题,利用该机制在读写时候可以去除锁机制 (备注:我认为利用 MVCC 可以保证事务 ACID 中的 C(一致性)和 I(隔离性)) 方案主要借鉴 leveldb 与 etcd(boltdb) 中事务的实现(主要利用 mvcc),方案设计如下:0 码力 | 15 页 | 555.93 KB | 1 年前3
TiDB v5.1 Documentation|---|---|---|---| |TiKV configuration file|resolved|Newly added|The number of threads that TiKV uses to scan the MVCC (multi-version concurrency control) lock data when initializing the resolved-ts. The default value scheduler-pending -write-threshold (100MB). You can verify the cause by viewing the metric corresponding to MVCC CONFLICT COUNTER. – Slow write causes write tasks to pile up. The data being written to TiKV exceeds Coprocessor has processed. Compared with total keys, processed keys does not include the old versions of MVCC. A great difference between processed keys and total keys indicates that many old versions exist.0 码力 | 2745 页 | 47.65 MB | 2 年前3
TiDB v8.5 Documentation1882  11.2.6 TiKV MVCC In-Memory Engine ··· 1885 11.2.7 Tune Region Performance ··· 1889 11.2.8 Tune TiFlash Performance 17.10.1 Massively Parallel Processing (MPP) ··· 6726 17.10.2 Multi-version concurrency control (MVCC) ··· 6726 17.11 O ··· 6726 17.11.1 Old value ··· 6726 17.11.2 Online Analytical Processing (OLAP) help you troubleshoot errors. ## 4.11.3.1 GC timeout TiDB's transaction implementation uses the MVCC (Multiple Version Concurrency Control) mechanism. When the newly written data overwrites the old data0 码力 | 6730 页 | 111.36 MB | 1 年前3
TiDB 与 TiFlash扩展——向真 HTAP 平台前进 韦万replication is asynchronous • Read operation guarantees strong consistency • Raft Learner read protocol + MVCC do the trick ☐ Check readIndex on read and wait for necessary log ☐ Read according to Timestamp |---|---|---|---| |a|102|0|bob| |a|104|0|alice| |a|108|1|alice| |b|105|0|kevin| |b|107|0|joe| Versioned rows (MVCC)  In memory, rowbased MPP Worker MPP Worker MPP Worker ## Performance • Underlying Storage Engine supports Multi-Raft + MVCC • Still comparable performance against Parquet • Benchmark against Apache Spark 2.3 on Parquet0 码力 | 45 页 | 2.75 MB | 1 年前3
PingCAP TiDB&TiKV Introduction OLTPFirst NewSQL - 全球级别分布式 / 跨数据中心复制 - Paxos - ACID 事务支持 - 两阶段提交 - 无锁快照读 / 无锁只读事务 - MVCC - External Consistency - TrueTime API • SQL 支持 • the Next BigTable Powered By Jeff Dean Raft 多副本一致性算法 ☐ 使用Multi Raft支持Dynamic Scale 支持类 Percolator 分布式事务 ● 提供 MVCC 支持 ☐ RocksDB |RPC| |---| |Transaction API| |MVCC| |Raft KV| |RocksDB| ## TiKV Overview . You can verify the cause by viewing the metric corresponding to MVCC CONFLICT COUNTER. – Slow write causes write tasks to pile up. The data being written to TiKV exceeds Coprocessor has processed. Compared with total keys, processed keys does not include the old versions of MVCC. A great difference between processed keys and total keys indicates that many old versions exist.0 码力 | 2996 页 | 49.30 MB | 2 年前3
TiDB v8.5 中文手册4.11.3.1 GC 超时 TiDB 的事务的实现采用了 MVCC(多版本并发控制)机制,当新写入的数据覆盖旧的数据时,旧的数据不会被 替换掉,而是与新写入的数据同时保留,并以时间戳来区分版本。TiDB 通过定期 GC 的机制来清理不再需要的 旧数据。 • TiDB v4.0 之前的版本: 默认情况下,TiDB 可以确保每个 MVCC 版本(一致性快照)保存 10 分钟。读取时间超过 10 分钟的事务, 以通过以下方式调大 MVCC 版本保留时间: • TiDB v5.0 之前的版本:调整 mysql.tidb 表中的 tikv_gc_life_time。 • TiDB v5.0 及之后的版本:调整系统变量tidb_gc_life_time。 需要注意的是,此变量的配置是立刻影响全局的,调大它会增加当前所有快照的生命时长,调小它也会立即 缩短所有快照的生命时长。过多的 MVCC 版本会影响 TiDB 的多版本并发控制 (MVCC) 以及 PD 默认的 compaction 间隔是 1 小时,TiCDC 占用的 PD 存储空间与 1 小时内元数据的版本数量成正比。在 v4.0.5、v4.0.6、 v4.0.7 三个版本中 TiCDC 存在元数据写入频繁的问题,如果 1 小时内有 1000 张表创建或调度,就会用尽 etcd 的 存储空间,出现 etcdserver: mvcc: database0 码力 | 5095 页 | 104.54 MB | 1 年前3
共 140 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14













