pingcap/tidb

Add Builtin Function to Get MVCC Information

Open

#15,938 创建于 2020年4月1日

在 GitHub 查看
 (9 评论) (0 反应) (0 负责人)Go (6,186 fork)batch import
component/expressionfeature/acceptedhelp wantedtype/feature-request

仓库指标

Star
 (40,090 star)
PR 合并指标
 (平均合并 14天 4小时) (30 天内合并 346 个 PR)

描述

Description

Currently getting information of mvcc relay on TiDB HTTP API:

$curl http://127.0.0.1:10080/mvcc/key/test/t1/1
{
    "info": {
        "writes": [
            {
                "commit_ts": 405179368526053380,
                "short_value": "CAICAkE=",
                "start_ts": 405179368526053377
            }
        ]
    }
}

It will be much easier if mvcc information can be get by builtin-function. Four function prototype have been designed:

  • mvcc_get_by_hex(hexValue)
  • mvcc_get_by_handle(db, table, handle)
  • mvcc_get_by_startTS(db, table, startTS)
  • mvcc_get_by_index(db, table, handle, indexValue)

Guide: you can archive this via the following steps:

  1. Add function in package expression
  2. Construct url according function parameter
  3. Get result from HTTP API

** Another need todo**

You need to consider output format, json format is not easy to understand.

Score

  • Each has 50 score

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Golang
  • SQL

Learning Materials

贡献者指南