imbajin commented on PR #3008:
URL: https://github.com/apache/hugegraph/pull/3008#issuecomment-4320235862

   ## 新增 API 单机版(非 PD)兼容性对照
   
   目标:社区默认的 RocksDB 单机版通过 `graphspace=DEFAULT` 使用 
GraphsAPI,应支持图的增删改查和基础权限管理。GraphSpaceAPI(图空间管理)、ManagerAPI(角色管理)、SchemaTemplateAPI(模板管理)属于
 PD 专属功能,不需要兼容。
   
   | API 端点 | 归属 | 非 PD 需兼容? | 当前状态 | 需要的改动 |
   |---------|------|:---:|---------|----------|
   | `GET .../graphs/profile` | GraphsAPI | ✅ | ⚠️ 基本可用,但 `writeConfigToString` 
可能泄露敏感配置 | 过滤敏感 key |
   | `POST .../graphs/{name}/default` | GraphsAPI | ✅ | ✅ StandardAuthManager 
有实现 | 无 |
   | `DELETE .../graphs/{name}/default` | GraphsAPI | ✅ | ✅ StandardAuthManager 
有实现 | 无 |
   | `GET .../graphs/default` | GraphsAPI | ✅ | ✅ StandardAuthManager 有实现 | 无 |
   | `PUT .../graphs/{name}` (manage) | GraphsAPI | ✅ | ❌ 
`isExistedGraphNickname` 走 metaManager 会 NPE | 加 `isPDEnabled()` 分支 |
   | `POST .../graphs` (create) | GraphsAPI | ✅ | ❌ 无条件填充 `backend=hstore` | 加 
`isPDEnabled()` 条件 |
   | `POST .../graphs/{name}` (createByText) | GraphsAPI | ✅ | ❌ 委托 create(),同上 
| 同上 |
   | `POST .../graphspaces/{gs}/role` | GraphSpaceAPI | ❌ | PD-only by design | 
无需改动 |
   | `GET .../graphspaces/{gs}/role` | GraphSpaceAPI | ❌ | PD-only by design | 
无需改动 |
   | `DELETE .../graphspaces/{gs}/role` | GraphSpaceAPI | ❌ | PD-only by design 
| 无需改动 |
   | `GET /auth/manager/default` | ManagerAPI | ❌ | 
PD-only(`ensurePdModeEnabled`)| 无需改动 |
   | `GET .../schematemplates` | SchemaTemplateAPI | ❌ | PD-only(走 
metaManager)| 无需改动 |
   | `GET .../schematemplates/{name}` | SchemaTemplateAPI | ❌ | PD-only | 无需改动 |
   | `POST .../schematemplates` | SchemaTemplateAPI | ❌ | PD-only | 无需改动 |
   | `PUT .../schematemplates/{name}` | SchemaTemplateAPI | ❌ | PD-only | 无需改动 |
   | `DELETE .../schematemplates/{name}` | SchemaTemplateAPI | ❌ | PD-only | 
无需改动 |
   
   **总结**:7 个 GraphsAPI 端点需要兼容单机版,其中 3 个(manage、create、createByText)目前会在非 PD 
模式下失败,需要补充 `isPDEnabled()` 分支处理。其余 9 个端点为 PD 专属功能,无需改动。
   


-- 
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]

Reply via email to