Support binding a TiFlash node to a specific keyspace
维护者通常 1 天内回复
评估
调研方向
Start by locating TiFlash startup configuration and the code that builds the proxy's --labels argument; the issue names no files or tests. Trace how store labels are reported to PD and how startup configuration is validated. Done means flash.keyspace_name is validated and, when set, reported as the keyspace label; the required client-go filter is a companion change.
由索引模型根据 Issue 内容生成。
描述
Enhancement
Background
With keyspace-based multi-tenancy, a single cluster hosts multiple keyspaces. TiDB instances are bound to their keyspaces, but TiFlash nodes are not: PD's GetTiFlashComputeStores returns all tiflash compute stores in the cluster regardless of keyspace, and there is no way to dedicate a TiFlash (CN) node to one keyspace.
As a result, in multi-keyspace deployments every keyspace shares every TiFlash node. One keyspace's workload can consume all TiFlash compute capacity and starve the others, and per-keyspace capacity planning is impossible.
Proposal
Introduce a config item, flash.keyspace_name, that binds a TiFlash node to a keyspace:
- When set, the node reports a
keyspace=<name>store label to PD (through the proxy's--labelsargument). The label is consumed by client-go'sGetTiFlashComputeStores, so a TiDB only dispatches MPP tasks to nodes bound to its keyspace. - Nodes without the config keep reporting no such label and remain shared by all keyspaces — fully backward compatible, existing clusters are unaffected.
- The value is validated at startup with the same rules as PD's keyspace name (
^[-A-Za-z0-9_]{1,20}$); an invalid value is a clear startup failure instead of a silently mis-registered node.
Note: this requires a companion change in client-go (KeyspaceLabelKey filter in GetTiFlashComputeStores).
Value
- Per-keyspace resource isolation for TiFlash compute: dedicated or shared compute pools per keyspace in multi-keyspace clusters.
- Zero migration cost for existing clusters.
- 主要语言
- C++
- 星标
- 1k
- 派生
- 428
- 平均合并
- 2 天 7 小时
- 30 天内合并 PR
- 100
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingcap/tiflash 的其他 Issue
-
component/compute type/bug
难度 2/5 1-2 天 新手友好度 82/100
维护者通常 1 天内回复
-
Out-of-bounds read in MyDateTime formatting from unvalidated packed values可能已有人在做 @ChangRui-Ryan 今天认领。 未关闭affects-25.10 affects-26.3 affects-26.9 affects-7.5 affects-8.1 affects-8.5 severity/major type/bug
难度 4/5 3-5 天 新手友好度 30/100
维护者通常 1 天内回复
-
component/storage severity/moderate type/bug
难度 4/5 3-5 天 新手友好度 48/100
pingcap/tiflash#11335 · 5 条评论 ·
维护者通常 1 天内回复
-
Missing validation in JSON constructors, LEFT expressions, and CH-block decoding可能已有人在做 @windtalker 今天认领。 未关闭type/bug
难度 4/5 3-5 天 新手友好度 25/100
维护者通常 1 天内回复
-
[disagg] Query fails with Code: 11000 NoSuchKey when S3 GC (ScanThenDelete) removes a DMFile that a compute node still reads可能已有人在做 @JinheLin 于 6 天前认领。 未关闭may-affects-25.10 may-affects-26.3 may-affects-26.9 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/moderate type/bug
pingcap/tiflash#11291 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 86/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
grizzlypeak3d/DJV#962 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
cognizant-backlog
难度 2/5 1-3 小时 新手友好度 61/100
KhronosGroup/OpenCL-CTS#2882 · 1 条评论 ·
维护者通常 1 天内回复
-
Documentation: Fix parameter markup, legacy branch link, and phrasing in Detachable Joints and Model Command tutorials可能已有人在做 @patelshivani2283-lab 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复