imbajin commented on code in PR #525:
URL: https://github.com/apache/hugegraph-doc/pull/525#discussion_r4286145329
##########
content/cn/docs/quickstart/toolchain/hugegraph-loader.md:
##########
@@ -982,6 +985,32 @@ bin/hugegraph-loader.sh \
本例用独立的 `docs_smoke_person` 标签和 `docs_*` 属性,避免与预置的 `person`
样例数据冲突。成功时统计中应显示顶点写入成功数为 `2`、边写入成功数为 `0`。也可以在 Hubble 的 Gremlin 工作台查询
`g.V().hasLabel('docs_smoke_person').values('docs_name')`,结果应包含
`docs-smoke-alice` 和 `docs-smoke-bob`。
+#### 3.4.6 并发导入与 LOADING owner {#loading-ownership}
+
+自 1.8.0 版本起,Loader 支持并发导入模式所有权保护协议。
+
+```mermaid
+graph TD
+ A["图模式 NONE"] -->|首个 Loader 申请所有权| B["进入 LOADING 模式 (分配 token)"]
+ B -->|其他并发 Loader 加入| B
+ B -->|部分 Loader 导入完成释放| B
+ B -->|最后一个 Loader 释放| C["自动恢复 NONE 模式"]
+ B -.->|异常/进程中断 (Token 残留)| D["手动调 API 释放 / 重启图实例"]
Review Comment:
Quoted the edge label in the Chinese diagram so Mermaid parses properly
without syntax errors.
##########
content/en/docs/quickstart/toolchain/hugegraph-loader.md:
##########
@@ -986,6 +989,38 @@ bin/hugegraph-loader.sh \
Expected result: two vertices and zero edges imported. This example uses
dedicated schema names to avoid conflicts with a preloaded `person` label. In
Hubble, run `g.V().hasLabel('docs_smoke_person').values('docs_name')` to
confirm `docs-smoke-alice` and `docs-smoke-bob`.
+#### 3.4.6 Concurrent imports and LOADING ownership {#loading-ownership}
+
+Starting with HugeGraph 1.8.0, Loader supports concurrent import protection
via the LOADING ownership protocol.
+
+```mermaid
+graph TD
+ A["Graph Mode: NONE"] -->|First Loader acquires owner| B["LOADING Mode
(Acquires Token)"]
+ B -->|Concurrent Loaders join| B
+ B -->|Loader finishes & releases| B
+ B -->|Last Loader releases| C["Restores to NONE"]
+ B -.->|Abnormal exit / kill -9| D["Manual REST API Release / Restart"]
+ D -.-> A
Review Comment:
Updated the recovery edge in both diagrams to show transitions to NONE (last
owner released or recover/restart) and back to active LOADING when other owners
remain active.
##########
content/en/docs/quickstart/toolchain/hugegraph-loader.md:
##########
@@ -986,6 +989,38 @@ bin/hugegraph-loader.sh \
Expected result: two vertices and zero edges imported. This example uses
dedicated schema names to avoid conflicts with a preloaded `person` label. In
Hubble, run `g.V().hasLabel('docs_smoke_person').values('docs_name')` to
confirm `docs-smoke-alice` and `docs-smoke-bob`.
+#### 3.4.6 Concurrent imports and LOADING ownership {#loading-ownership}
+
+Starting with HugeGraph 1.8.0, Loader supports concurrent import protection
via the LOADING ownership protocol.
+
+```mermaid
+graph TD
+ A["Graph Mode: NONE"] -->|First Loader acquires owner| B["LOADING Mode
(Acquires Token)"]
+ B -->|Concurrent Loaders join| B
+ B -->|Loader finishes & releases| B
+ B -->|Last Loader releases| C["Restores to NONE"]
+ B -.->|Abnormal exit / kill -9| D["Manual REST API Release / Restart"]
+ D -.-> A
+```
+
+1. **Probe and Acquire**: Loader probes `/mode/owners`. The first Loader
obtains an ownership handle (`instance/epoch/token`),
+ transitioning graph mode from `NONE` to `LOADING`; concurrent Loaders can
join.
+2. **Data Import**: Loaders holding valid handles execute concurrent imports
safely.
+3. **Graceful Release**: When an import completes, Loader drains its workers
and releases its handle. When the last owner releases,
+ graph mode automatically returns to `NONE`.
+4. **Failure Recovery**: If abnormal exit (e.g. `kill -9`) leaves an orphaned
owner, release it manually via the
Review Comment:
Documented the administrator recover action in 6.3.5 (EN and CN) with
revision, admin role requirement, confirmation phrase, and 409 conflict
handling. Updated failure recovery in both guides to stop and drain imports
before administrator recovery or Server restart.
##########
content/en/docs/quickstart/toolchain/hugegraph-loader.md:
##########
@@ -986,6 +989,38 @@ bin/hugegraph-loader.sh \
Expected result: two vertices and zero edges imported. This example uses
dedicated schema names to avoid conflicts with a preloaded `person` label. In
Hubble, run `g.V().hasLabel('docs_smoke_person').values('docs_name')` to
confirm `docs-smoke-alice` and `docs-smoke-bob`.
+#### 3.4.6 Concurrent imports and LOADING ownership {#loading-ownership}
+
+Starting with HugeGraph 1.8.0, Loader supports concurrent import protection
via the LOADING ownership protocol.
Review Comment:
Added notes in the overview, section 3.4.6, and graphs.md 6.3.5 stating that
the protocol requires Server PR #3331 and Toolchain PR #815, which are not
merged into master yet.
--
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]