imbajin commented on code in PR #444: URL: https://github.com/apache/incubator-hugegraph-doc/pull/444#discussion_r2707284640
########## content/cn/docs/clients/restful-api/graphs.md: ########## @@ -166,7 +166,15 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx ##### Request Body -创建一个非鉴权模式的图(设置 `Content-Type: application/json`) +创建一个图(设置 `Content-Type: application/json`) + +**`gremlin.graph` 配置说明:** +- 非鉴权模式:`"gremlin.graph": "org.apache.hugegraph.HugeFactory"` +- 鉴权模式:`"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` + +**注意**!!1.7.0 及之前,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed"。同时请确保 HugeGraph-Server 已正确配置 PD,参见 [HStore 配置](/cn/docs/quickstart/hugegraph/hugegraph-server/#511-分布式存储hstore)。 + Review Comment: ‼️ **配置说明与页面顶部警告冲突** 第 169-176 行的文档说明存在严重的上下文完整性问题: - 第 9 行明确说明:**1.7.0 及之后,动态创建图必须开启鉴权模式** - 但第 173 行的示例仍然展示的是非鉴权模式:`org.apache.hugegraph.HugeFactory` 这会导致用户在 1.7.0+ 版本按照此示例操作时失败。 **建议修改:** ```suggestion 创建一个图(设置 `Content-Type: application/json`) **\`gremlin.graph\` 配置说明:** - 非鉴权模式:`"gremlin.graph": "org.apache.hugegraph.HugeFactory"` (仅 1.6.x 及更早版本支持动态创建) - 鉴权模式:`"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` (1.7.0+ 必须使用) **注意**!! 1. **1.7.0 及之后版本动态创建图必须开启鉴权模式** 2. 1.7.0 及之前,如果 backend 是 hstore,必须在请求体加上 "task.scheduler_type": "distributed"。同时请确保 HugeGraph-Server 已正确配置 PD,参见 [HStore 配置](/cn/docs/quickstart/hugegraph/hugegraph-server/#511-分布式存储hstore)。 **RocksDB 示例(鉴权模式 - 适用于 1.7.0+):** ``` ########## content/cn/docs/clients/restful-api/graphs.md: ########## @@ -166,7 +166,15 @@ POST http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph-xx ##### Request Body -创建一个非鉴权模式的图(设置 `Content-Type: application/json`) +创建一个图(设置 `Content-Type: application/json`) + +**`gremlin.graph` 配置说明:** +- 非鉴权模式:`"gremlin.graph": "org.apache.hugegraph.HugeFactory"` +- 鉴权模式:`"gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy"` + Review Comment: ‼️ **RocksDB 示例应更新为鉴权模式** 第 174-181 行的 RocksDB 示例仍然使用非鉴权配置,但根据第 9 行的警告,1.7.0+ 必须使用鉴权模式。 **建议修改:** ```suggestion { "gremlin.graph": "org.apache.hugegraph.auth.HugeFactoryAuthProxy", "backend": "rocksdb", "serializer": "binary", "store": "hugegraph", "rocksdb.data_path": "./rks-data-xx", "rocksdb.wal_path": "./rks-data-xx" } ``` 并在示例标题中明确说明:**RocksDB 示例(鉴权模式 - 适用于 1.7.0+):** -- 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]
