imbajin commented on code in PR #525: URL: https://github.com/apache/hugegraph-doc/pull/525#discussion_r4263474758
########## content/en/docs/clients/restful-api/graphs.md: ########## @@ -660,6 +662,56 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph_read_mode } ``` +#### 6.3.5 LOADING ownership {#loading-ownership} + +These proposed, unreleased endpoints require a build containing [Server #3331](https://github.com/apache/hugegraph/pull/3331). +Loader integration also requires [Client/Loader #815](https://github.com/apache/hugegraph-toolchain/pull/815). +Released packages, earlier 1.8 builds and current Apache master lack this contract. Support for the `LOADING` enum alone does not imply support for it. +With authentication enabled, both endpoints use the mode setter's permissions: graph-space management (`space`) or graph ownership, with STATUS write +authorization. Server binds the handle to the authenticated principal; a token grants no permission. Keep the same identity for acquire, release and retries. + +```text +GET http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/mode/owners +``` + +The `200` capability response contains the graph-instance UUID and current nonnegative epoch: + +```json +{ + "protocol": 1, + "instance": "<instance UUID>", + "epoch": 0 +} +``` + +Generate a new canonical UUID `token` for each import, retain the returned `instance` and `epoch`, and acquire with `Content-Type: application/json`: + +```text +PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/mode/owners +``` + +```json +{ + "action": "acquire", + "instance": "<instance UUID>", + "epoch": 0, + "token": "<import UUID>" +} +``` + +A confirmed acquisition returns `200`, echoing `protocol`, `instance`, `epoch` and `token`, with `state: "active"` and `mode: "LOADING"`. +Release with `action: "release"` and the same handle; its response has `state: "released"` and the effective graph mode. +Keep one handle for retries; Server checks its principal, instance and epoch. A released handle cannot acquire again. Review Comment: Addressed in 019fb6e32: documented that acquire succeeds only when state is active, and state released with 200 indicates expired/preemptively cancelled handle requiring fresh token and GET for instance/epoch. ########## content/en/docs/clients/restful-api/graphs.md: ########## @@ -660,6 +662,56 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph_read_mode } ``` +#### 6.3.5 LOADING ownership {#loading-ownership} + +These proposed, unreleased endpoints require a build containing [Server #3331](https://github.com/apache/hugegraph/pull/3331). +Loader integration also requires [Client/Loader #815](https://github.com/apache/hugegraph-toolchain/pull/815). +Released packages, earlier 1.8 builds and current Apache master lack this contract. Support for the `LOADING` enum alone does not imply support for it. +With authentication enabled, both endpoints use the mode setter's permissions: graph-space management (`space`) or graph ownership, with STATUS write +authorization. Server binds the handle to the authenticated principal; a token grants no permission. Keep the same identity for acquire, release and retries. + +```text +GET http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/mode/owners +``` + +The `200` capability response contains the graph-instance UUID and current nonnegative epoch: + +```json +{ + "protocol": 1, + "instance": "<instance UUID>", + "epoch": 0 +} +``` + +Generate a new canonical UUID `token` for each import, retain the returned `instance` and `epoch`, and acquire with `Content-Type: application/json`: Review Comment: Addressed in 019fb6e32: explicitly specified lowercase hyphenated UUID token format in both EN and CN sections. ########## content/cn/docs/clients/restful-api/graphs.md: ########## @@ -655,6 +657,55 @@ PUT http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph_read_mode } ``` +#### 6.3.5 LOADING owner 管理 {#loading-ownership} + +以下尚未发布的 owner 协议 1 接口要求使用包含 [Server #3331](https://github.com/apache/hugegraph/pull/3331) 的构建; +Loader 集成另需配套的 [Client/Loader #815](https://github.com/apache/hugegraph-toolchain/pull/815)。 +已发布包、较早的 1.8 构建与当前 Apache master 不包含该合同;仅支持 `LOADING` 枚举不能说明支持这些接口。 Review Comment: Addressed in 019fb6e32: updated term to 该协议 to remain consistent with the rest of the document. -- 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]
