1.2 Go in TiDB
Go 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 | 5 月前31.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 | 5 月前3William Kennedy Building Relevancy Engine MongoDB Go
No builds required to add new rules. BUSINESS PROBLEM Our Answer Go Language MongoDB Mgo/Beego If we had a system that could do inser*on. Two Go programs perform all the feed management work WHY GO - DYNAMIC FEED MANAGEMENT The Feed System Is Driven By Data Go supports Data from Offer and Internal Feeds DYNAMIC RULE MANAGEMENT Our Answer Go Language MongoDB Mgo/Beego Building rules is a core piece of the0 码力 | 17 页 | 2.39 MB | 1 年前32.1.4 PingCAP Go runtime related problems in TiDB production environment
Go 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 | 5 月前3Go和TiDB创造另一个mongodb-李霞
Go � TiDB ����� mongodb lixia@pingcap.com @���_go About me ��� PingCAP �� 15 ���� PingCAP ���� TiDB ��������� review ������� 12 ������� go ���������� 13 ������������������������ ���� ���� ���@���_go Email: lixia@pingcap.com Agenda mongodb introduction gonzo with memory engine gonzo with TiKV engine TiDB and TiKV Transaction Q & A mongodb introduction mongodb introduction0 码力 | 24 页 | 1.32 MB | 1 年前32019 Vitess at GoSV
stars 16,000+ commits Marquee adopters 100+ contributors 700+ Slack members History ● Choosing Go ● TCP, Syscalls, GC, Scheduler 2013 2015 2016 First Kubernetes Production launch Last Sunday.0 码力 | 20 页 | 1.07 MB | 1 年前3The Vitess 11.0 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Learning Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Google I/O 2014 - Scaling with Go: YouTube’s Vitess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Vitess Roadmap read traffic to individual cells, Vitess currently serves reads only from the local cell. Writes will go cross-cell when necessary, to wherever the master for that shard resides. Execution Plans Vitess0 码力 | 481 页 | 3.14 MB | 1 年前3The Vitess 8.0 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1 Learning Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Google I/O 2014 - Scaling with Go: YouTube’s Vitess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Vitess Roadmap 6824 main.go:64] W0521 01:05:40.443180 reparent.go:185] master -elect tablet zone1 -0000000100 is not the shard master, proceeding anyway as -force was used 16 W0520 18:05:40.445230 6824 main.go:64] W05210 码力 | 331 页 | 1.35 MB | 1 年前3The Vitess 10.0 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Learning Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Google I/O 2014 - Scaling with Go: YouTube’s Vitess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Vitess Roadmap read traffic to individual cells, Vitess currently serves reads only from the local cell. Writes will go cross-cell when necessary, to wherever the master for that shard resides. Execution Plans Vitess0 码力 | 455 页 | 3.07 MB | 1 年前3The Vitess 12.0 Documentation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Learning Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Google I/O 2014 - Scaling with Go: YouTube’s Vitess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Vitess Roadmap read traffic to individual cells, Vitess currently serves reads only from the local cell. Writes will go cross-cell when necessary, to wherever the primary for that shard resides. 22 Execution Plans Vitess0 码力 | 534 页 | 3.32 MB | 1 年前3
共 236 条
- 1
- 2
- 3
- 4
- 5
- 6
- 24