Repository navigation
Conversation
Add a beginner-oriented architecture guide in both Chinese and English, covering 15 core terms, an architecture diagram, the lifecycle of one SQL statement, data distribution strategies, easily confused boundaries, an FAQ, and common deployment pitfalls. Every architectural claim is traceable to the repository at b612d77: - centralized mode ignores GTM/CN configuration and keeps one DN group (contrib/opentenbase_ctl/src/config/config.h) - the default node group is built from DN masters only (contrib/opentenbase_ctl/src/cluster/cluster.cpp) - SHARD/HASH/MODULO/REPLICATION/ROUNDROBIN distribution types (src/backend/parser/gram.y) Also add an AI usage self-report and a newcomer entry link in both README files. Relates to OpenTenBase#200
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
Relates to #200
变更内容
doc/GLOSSARY_ZH.md与doc/GLOSSARY.md,提供中英双语的架构术语表与新手导览。gram.y补全五种分布类型与 Greenplum 兼容语法对照表。README.md与README_ZH.md概览段后各增加一个入口链接(每份 2 行)。doc/AI_USAGE_REPORT_ZH.md,含 6 条具体的 AI 输出纠正记录。变更原因
现有 README 的概览用较短篇幅介绍了 CN、DN 和 GTM,但新手仍需自行拼凑以下认知:一次请求如何穿过集群、数据按什么规则落到哪个节点、部署配置里的
nodes-per-server和node group到底指什么。这些信息分散在 README 配置表、安装日志、C++ 头文件注释和语法定义中。把这份导览放在概览之后、安装步骤之前,可以让读者在动手编译前先建立整体架构认识,降低理解成本。
与仓库内容的核对情况
本 PR 不依赖通用分布式数据库常识,所有结论均可回溯到
b612d77c基线。重点核对并修正了三处易错表述:contrib/opentenbase_ctl/src/config/config.h中ConfigFileInstance::type的注释明确说明该模式「会忽略gtm和协调节点的配置,只有1组数据节点」。因此文档没有写成「三个角色合并进同一进程」。contrib/opentenbase_ctl/src/cluster/cluster.cpp的build_create_node_group_cmd()只收集NODE_TYPE_DN_MASTER,生成CREATE DEFAULT node group default_group with (...),随后执行CREATE sharding group to group default_group;。因此文档明确 Node Group 组织的是 DN,并给出默认组名。src/backend/parser/gram.y的OptDistributeByInternal规则显示语法支持SHARD、HASH、MODULO、REPLICATION、ROUNDROBIN,并兼容DISTRIBUTED BY/DISTRIBUTED RANDOMLY/DISTSTYLE写法。文档同时提示语法支持不等于各版本执行路径完全等价。另外,架构图中 GTM 使用虚线并明确其不参与查询拆分,因为仓库中没有支持「GTM 拆分 SQL」的依据。
验证
git diff --check通过。AI 使用策略自我报告
完整报告见
doc/AI_USAGE_REPORT_ZH.md。要点如下: