Offer the sharding setting when creating a Fabric cluster

未关闭
#2,084 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
58/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

Start by reading Studio's create-cluster flow and configRestrictions.ts, then check how it submits cluster settings and displays errors from central-manager. Add an optional sharding section with the stated limits, compatibility checks, and read-only-after-creation behavior; keep replication restrictions unchanged. Done when the supported sharding settings validate before submission and central-manager scale-in errors appear unchanged.

由索引模型根据 Issue 内容生成。

描述

Problem

Central-manager accepts sharding: { shards, minOwners } on POST /Cluster (HarperFast/central-manager#527), for Harper 5.4 schema-defined sharding. Studio's create-cluster flow has no way to set it, so a sharded Fabric cluster can only be created through the API. Studio's configRestrictions.ts blocks editing replication except databases, which should stay as it is: shard settings are managed by Fabric, not by node config edits.

Proposed

An optional sharding section in the create-cluster flow:

  • Shards: 2 to 256.
  • Owners per shard (minOwners): default 2; 1 allowed, with a warning that losing that one owner loses the shard's records for good.
  • Validate before submit as central-manager does: Harper 5.4.0-beta.3 or later, a hosted (not self-hosted) cluster with region plans, and at least shards * minOwners instances across the chosen plans. Central-manager answers 400 with the reason otherwise.
  • After creation the setting is read-only. It cannot be changed or turned on later (HarperFast/central-manager#1158 covers enabling on an existing cluster, HarperFast/central-manager#1159 changing the shard count).

On scale-in, central-manager refuses a change that would leave a shard with fewer than minOwners running owners and names the shard. Studio should show that message as is.

Not in scope

Showing shard ownership on the cluster page is #2081 and is not part of this issue.

🤖 Generated by Anthropic Claude Code (Claude Opus); posted via @kriszyp.

主要语言
TypeScript
星标
5
派生
4
平均合并
2 天 13 小时
30 天内合并 PR
60

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

HarperFast/studio 的其他 Issue

查看 HarperFast/studio 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。