AlexStocks commented on code in PR #34:
URL: https://github.com/apache/dubbo-net/pull/34#discussion_r4536753642
##########
Docs/en/architecture/metadata.md:
##########
@@ -0,0 +1,26 @@
+# Metadata: From Java Definitions to Invocation Signatures
+
+[Call-path overview](index.md) · [中文](../../zh/architecture/metadata.md)
+
+## Responsibility
+
+Metadata obtains Java interface method names, parameter types, and overload
definitions, then matches caller arguments to a signature. It caches **method
definitions**, not callable Provider candidates, and does not perform protocol
I/O. [Registry discovery](registry.md) finds Providers, while [service
selection](selection.md) maintains and selects callable candidates.
+
+## Loading definitions and resolving signatures
+
+`DubboMetadataManager` loads and caches definitions per service. Depending on
Provider version and available sources, it reads from the metadata center or a
short-lived Telnet `ls -l` query; Telnet can also supplement incomplete
definitions. Locating a Provider may reuse registry discovery without creating
a business-call driver. The metadata center can share the registry address or
use a separate one.
Review Comment:
[P2] 本轮协议页收敛删掉的两项行为,在 `Docs/` 树内已无任何落点
**触发条件**:本 head(`99b905d`,相对 `eab4c86` 的增量)把
`Docs/{en,zh}/protocols/native-dubbo.md` 的“当前边界”压缩为“支持范围与连接行为”,删掉 6
条行为说明。其中大部分在 `Docs/{en,zh}/architecture/metadata.md` 有对应段落(来源选择、Telnet
补全、`DubboMetadataException`、零参数回退),但下面两项在整棵 `Docs/` 里搜不到替代:
1. **`MetadataCenterAddress` /
`MetadataRootPath`**。旧文写的是“元数据中心默认复用注册中心,也可以通过 `MetadataCenterAddress` 和
`MetadataRootPath` 单独配置”。本行现在只剩“元数据中心既可与注册中心共用地址,也可单独配置”,没有给出属性名。全仓检索这两个名字只命中
`Clients/DubboClient.cs:120,125,262,268`(`DubboClientConf`
的公开配置项),`README.md`、`readme_cn.md` 与 `Docs/` 均无记载——迁移后这两个公开配置项失去了唯一的文档入口。
2. **Telnet 元数据的泛型类型名擦除**。旧文写的是“Telnet 扩展若输出带泛型参数的源码式类型名,写入 `$invoke` 的
`parameterTypes` 前会按 Java 类型擦除为可加载的原始类名”。在 `Docs/` 内检索 `擦除|erasure|erase`
无结果,`metadata.md` 的 Telnet 段落只讲了“补全不完整的定义”,没有这一句。
**实际影响**:需要用独立元数据中心的读者无法从文档查到配置键名;调用带泛型参数的方法时,读者也无从得知 `parameterTypes`
在写入前被改写。两者都只能靠读源码才能发现,而这两句在本次改动前是有文档的。
**修复方向**:在本行补出两个属性名(或指向 README 的配置表),并在 `metadata.md` 的 Telnet
段落补一句类型擦除;`Docs/zh/architecture/metadata.md:11` 同构同步。
**已复核通过的部分**(不再单独提):本 head 引用的 14 个源文件与 13 个方法名全部存在于 `99b905d` 的源码树(含
`DubboClientZookeeperWatcher.process(WatchedEvent)` 与
`GetDubboActuatorSuite(..., bool reserve = false)`);`Docs/` 24
个文件、README/readme_cn 的本地相对链接目标均存在;`Tests/EndToEndTestEnvironment/README.md`
存在;`CHANGELOG.md` 引用的 9 个 PR(#1/#18/#21/#22/#23/#24/#28/#29/#30)经 API 核对全部
`merged=true`;`Docs/import-status.md` 指向的 `e10f6d5/Docs/ImportReviewStatus.md`
blob 确实存在(sha `74026da`,15242 字节),删页后仍可回溯。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]