liurenjie1024 commented on issue #1411: URL: https://github.com/apache/iceberg-rust/issues/1411#issuecomment-3297410403
> ## 设计不一致性分析和架构简化建议 > 经过深入分析当前代码,我发现了一个重要的设计不一致性,它实际上支持了这个issue的原始建议。 > > ### 当前设计不一致性 > **问题描述:** PR [#1417](https://github.com/apache/iceberg-rust/pull/1417)(commit [d149037](https://github.com/apache/iceberg-rust/commit/d149037282ad1436f05f125ec158a24e5d4f2b91),2025年6月9日)创造了一个设计矛盾: > > 1. **验证逻辑(line 331-337):** `validate_storage_and_scheme` 函数仍然期望: > > * `wasb/wasbs` 方案应该使用 "blob" 服务进行验证 > * `abfs/abfss` 方案应该使用 "dfs" 服务进行验证 > 2. **端点生成(line 258):** `as_endpoint` 方法被硬编码为: > format!("{}://{}.dfs.{}", self.scheme.as_http_scheme(), self.account_name, self.endpoint_suffix) > > > > > > > > > > 无论方案是什么,都始终使用 `dfs` 端点。 > > ### 实际影响 > 这意味着像 `wasbs://m...@account.blob.core.windows.net/file` 这样的URL: > > * ✅ **能通过验证**:因为从URL提取的service是"blob",符合wasbs方案的验证期望 > * ⚠️ **实际生成的端点却是**:`https://account.dfs.core.windows.net` > > **结论:验证逻辑与实际行为完全脱节。** > > ### 架构简化方案 > 既然PR #1417已经证明了不区分wasb/abfs服务的可行性(统一使用dfs端点解决了ADLS API问题),我们有两种清理方案: > > #### 方案1(推荐):完全移除方案验证 > * 移除 `validate_storage_and_scheme` 函数 > * 移除 `AzureStorageScheme` 枚举和相关验证 > * 简化 `AzureStoragePath` 结构 > * 直接实现原issue的目标:"trim the storage scheme after parsing" > > #### 方案2(保守):修复验证逻辑 > * 更新验证逻辑统一期望所有方案使用dfs服务 > * 保持当前架构复杂度 > > ### 对原始讨论的回应 > [@DerGut](https://github.com/DerGut) 在评论中提到: > > > "We don't really distinguish between `wasb[s]` and `abfs[s]`, only between their TLS and non-TLS versions." > > PR #1417的实现已经证实了这一点 - 我们现在实际上只区分TLS和非TLS,不区分服务类型。 > > [@liurenjie1024](https://github.com/liurenjie1024) 关于验证价值的担忧在 [#1314](https://github.com/apache/iceberg-rust/issues/1314) 解决后可能不再适用,而且当前的验证逻辑实际上已经失去了意义。 > > ### 建议 > 由于当前设计不一致性已经存在6个月,我建议: > > 1. **优先选择方案1**:完全移除方案验证,简化架构 > 2. **保留TLS强制机制**:通过其他方式实现,如配置选项 > 3. **加强测试覆盖**:确保wasb和abfs方案的完整解析流程 > > 这样既解决了当前的设计矛盾,又实现了原issue提出的架构简化目标。 > > [@DerGut](https://github.com/DerGut) 你觉得这个分析和建议如何?既然PR #1417已经实际上实现了"不区分wasb/abfs服务",是否可以进一步简化架构? cc @Xuanwo Should we delete this? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org