imbajin commented on code in PR #2906:
URL:
https://github.com/apache/incubator-hugegraph/pull/2906#discussion_r2544825716
##########
hugegraph-store/hg-store-core/pom.xml:
##########
@@ -178,6 +178,12 @@
<artifactId>hg-store-client</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.hugegraph</groupId>
+ <artifactId>hg-pd-core</artifactId>
Review Comment:
‼️ **模块依赖问题 - 需要架构评审**
在 hg-store-core 的 pom.xml 中添加了对 hg-pd-core 的编译时依赖:
```xml
<dependency>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hg-pd-core</artifactId>
<version>1.7.0</version>
<scope>compile</scope>
</dependency>
```
**潜在问题:**
1. **循环依赖风险**:PartitionEngine 现在依赖 hg-pd-core 中的 RaftReflectionUtil。需要检查
hg-pd-core 是否依赖 hg-store-core,避免循环依赖
2. **模块职责不清**:RaftReflectionUtil 放在 hg-pd-core 中,但被 store
模块使用。考虑是否应该放在一个更通用的 common 模块中?
3. **版本硬编码**:版本号 1.7.0 是硬编码的,应该使用 ${project.version} 或在父 pom 中统一管理 (默认使用
`${revision}` )
**建议:**
- 确认这个新的依赖关系符合项目的模块架构设计, 是否应该把它放到一个更合适, 已被依赖引用的模块里?
--
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]