• golang-heap

    // The Interface type describes the requirements // for a type using the routines in this package. // Any type that implements it may be used as a // min-heap with the following invariants (established after // [Init] has been called or if the data is empty or sorted): //...

  • golang-gmp模型

    G M P 模型 一句话:调度器调度任务队列、P在M上运行去执行G 两个任务队列 - 全局任务队列 - P本地队列 调度器 总览 ​ 1、我们通过 go func () 来创建一个 goroutine; ​ 2、有两个存储 G 的队列,一个是局部调度器 P 的本地队列、一个是全局 G 队列。新创建的 G 会先保存在 P 的本地队列中,如果 P 的本地队列已经满了就会保存在全局的队列中; ​ 3、G 只能运行在 M 中,一个 M 必须持有一个 P,M 与 P 是 1:1 的关系。M 会从 P 的本地队列弹出一个可执行状态的 G...

  • gh-ost 源码阅读

    地址: https://github.com/github/gh-ost/tree/master/go https://deepwiki.com/github/gh-ost 目录结构 ├── base │ ├── context_test.go │ ├── context.go │ ├── default_logger.go │ ├── load_map_test.go │ ├── load_map.go │ ├── utils_test.go │ └── utils.go ├── binlog │ ├── binlog_dml_event.go │ ├── binlog_entry.go │ ├── binlog_reader.go │ ├── gomysql_reader.go │ └── testdata │ ├── mysql-bin.000066 │ ├── mysql-bin.000070...