1.2 Go in TiDBGo in TiDB 申砾@PingCAP Agenda • About Me • What is TiDB • TiDB Architecture • SQL Layer Internal • Golang in TiDB • Next Step of TiDB About Me • Shen Li (申砾) • Tech Lead of TiDB, VP of Engineering Why Go? • Productivity • Concurrency • Great for network programming • GC • Standard libraries && Tools • Good performance • Quick improvement Go in TiDB • More than 100k lines of Go code and session is hard • Account for large memory allocation • Account for memory consuming operators New in Go1.8 • Better GC • Pauses 50μs • sort.Slice Next Step of TiDB • Switch to gRPC • Document support0 码力 | 27 页 | 935.47 KB | 6 月前3
1.3 Go practices in TiDB 姚维Go Practices in TiDB 姚维 PingCAP wink@pingcap.com Agenda ● How to build a stable database ○ Schrodinger-test platform ○ Failpoint injection ○ Goroutine-leak detection ● Optimization ○ Chunk vs interface{} errors.New("mock commit error") // } …. } https://github.com/pingcap/tidb/blob/master/store/tikv/txn.go#L223 The generated gofail code func (txn *tikvTxn) Commit(ctx context.Context) error { if vmockCommitError or: __fp_mockCommitError.BadType(vmockCommitError, "bool"); }; …. } $ gofail enable store/tikv/txn.go Why we need a new failpoint ● Generated code is not readable ● Concurrent testing will use the same0 码力 | 32 页 | 1.76 MB | 6 月前3
2.1.4 PingCAP Go runtime related problems in TiDB production environmentGo runtime related problems in TiDB production environment About me ● Arthur Mao(毛康力), Senior Engineer@PingCAP ● TiDB core developer (top3 contributor) ● GitBook about golang internals (@tiancaiamao) consider priority ● CPU dense workload could affect IO latency Conclusion Part II - Memory control ● Go Runtime ○ Allocated from OS (mmaped) ○ Managed Memory ■ Should the memory be returned to the OS? ○ memory footprint is abnormal ● The memory available on this node is not too much Description ● The Go Runtime thinks it does not use much memory ● The OS does not release the memory (RSS is high) Investigate0 码力 | 56 页 | 50.15 MB | 6 月前3
TiDB v6.5 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 138 4.3.2 Go · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · of replicas. This can guarantee strong consis- tency, and availability when a minority of replicas go down. To meet the requirements of different disaster tolerance levels, you can configure the geographic you’ve selected. 1. Navigate to the Clusters page, and then click the name of your target cluster to go to its overview page. 2. Click Connect in the upper-right corner. A connection dialog is displayed0 码力 | 5282 页 | 99.69 MB | 1 年前3
TiDB v7.5 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 119 4.3.2 Go · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · majority of replicas. This guarantees strong consistency and availabil- ity when a minority of replicas go down. You can configure the geographic location and number of replicas as needed to meet different graph of heap profile. This feature 38 �→ provides the same simple and easy-to-use experience as Go heap �→ profiling. 2.2.1 Feature details 2.2.1.1 Scalability • Support designating and isolating0 码力 | 6020 页 | 106.82 MB | 1 年前3
TiDB v7.6 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 132 4.3.2 Go · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · majority of replicas. This guarantees strong consistency and availabil- ity when a minority of replicas go down. You can configure the geographic location and number of replicas as needed to meet different approximately 30 seconds. 6. After your TiDB Cloud cluster is created, click your cluster name to go to the cluster overview page, and then click Connect in the upper-right corner. A connection dialog0 码力 | 6123 页 | 107.24 MB | 1 年前3
TiDB v7.1 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 139 4.3.2 Go · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · majority of replicas. This guarantees strong consistency and availabil- ity when a minority of replicas go down. You can configure the geographic location and number of replicas as needed to meet different approximately 30 seconds. 6. After your TiDB Cloud cluster is created, click your cluster name to go to the cluster overview page, and then click Connect in the upper-right corner. A connection dialog0 码力 | 5716 页 | 104.74 MB | 1 年前3
TiDB v8.5 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 153 4.3.2 Go · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · majority of replicas. This guarantees strong consistency and availabil- ity when a minority of replicas go down. You can configure the geographic location and number of replicas as needed to meet different approximately 30 seconds. 6. After your TiDB Cloud cluster is created, click your cluster name to go to the cluster overview page, and then click Connect in the upper-right corner. A connection dialog0 码力 | 6730 页 | 111.36 MB | 10 月前3
TiDB v8.4 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 148 4.3.2 Go · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · majority of replicas. This guarantees strong consistency and availabil- ity when a minority of replicas go down. You can configure the geographic location and number of replicas as needed to meet different approximately 30 seconds. 6. After your TiDB Cloud cluster is created, click your cluster name to go to the cluster overview page, and then click Connect in the upper-right corner. A connection dialog0 码力 | 6705 页 | 110.86 MB | 10 月前3
TiDB v8.2 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 123 4.3.2 Go · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · majority of replicas. This guarantees strong consistency and availabil- ity when a minority of replicas go down. You can configure the geographic location and number of replicas as needed to meet different environment #11219 @lidezhu • TiDB Data Migration (DM) • Fix the connection blocking issue by upgrading go-mysql #11041 @D3Hunter • Fix the issue that SET statements cause DM to panic during the migration of0 码力 | 6549 页 | 108.77 MB | 10 月前3
共 43 条
- 1
- 2
- 3
- 4
- 5













