apache / apache/hugegraph-toolchain
[Bug] hugegraph migrate failed
- Dominant language
- Java
- Stars
- 121
- Forks
- 125
- Avg merge
- 10d 10h
- Merged PRs (30d)
- 3
Description
### Bug Type (问题类型)
exception / error (异常报错)
### Before submit
- [x] I had searched in the [issues](https://github.com/apache/hugegraph-toolchain/issues) and found no similar issues.
### Environment (环境信息)
- Server Version: v0.12.0
- Toolchain Version: v1.6.0
- Data Size: 196372737 vertices, 2556735085 edges
### Expected & Actual behavior (期望与实际表现)
# exec cml
```
nohup ./hugegraph --url http://192.168.7.10:8080 --graph fullgraph migrate --target-url http://192.168.7.10:8081 --target-graph fullgraph --huge-types edge --retry 30 --target-timeout 300 &
```
# log
```
Migrate graph 'fullgraph' from 'http://192.168.7.10:8080' to 'http://192.168.7.10:8081' as 'fullgraph'
Init 10 executors
Edges backup started
Edges has been backup: 2556735085
Edges backup finished: 2556735085
===============================================
backup summary: {
property key number: 0,
vertex label number: 0,
edge label number: 0,
index label number: 0,
vertex number: 0,
edge number: 2556735085,
}
cost time(s): 8488
Graph 'fullgraph' start restore in mode 'RESTORING'!
Init 10 executors
Edges restore started
Restoring EDGE ...
files: [
edges0.zip,
edges4.zip,
edges6.zip,
edges3.zip,
edges1.zip,
edges2.zip,
edges7.zip,
edges8.zip,
edges9.zip,
edges5.zip,
]
Edges has been restored: When restoring edges in file 'edges8.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges4.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges3.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges5.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges2.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges6.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges7.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges1.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges0.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
When restoring edges in file 'edges9.zip' occurs exception 'com.baidu.hugegraph.exception.ToolsException: Exception occurred while restoring edges(after 30 retries)'
2171645546
Edges restore finished: 2171645546
===============================================
restore summary: {
property key number: 0,
vertex label number: 0,
edge label number: 0,
index label number: 0,
vertex number: 0,
edge number: 2171645546,
}
cost time(s): 1069245
Failed to execute Failed to do request
Type y(yes) to print exception stack[default n]?
Exception in thread "main" java.util.NoSuchElementException: No line found
at java.util.Scanner.nextLine(Scanner.java:1540)
at com.baidu.hugegraph.util.ToolUtil.printExceptionStackIfNeeded(ToolUtil.java:46)
at com.baidu.hugegraph.util.ToolUtil.printOrThrow(ToolUtil.java:40)
at com.baidu.hugegraph.cmd.HugeGraphCommand.main(HugeGraphCommand.java:553)
```
### Vertex/Edge example (问题点 / 边数据举例)
_No response_
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
```javascript
{
"vertexlabels": [
{
"id": 3,
"name": "myvertex",
"id_strategy": "CUSTOMIZE_STRING",
"primary_keys": [],
"nullable_keys": [
"type",
"id",
"tiv",
"fh",
"tov",
"b",
"e",
"t"
],
"index_labels": [
"vi_b",
"vi_tiv",
"vi_tov",
"vi_type",
"vi_id"
],
"properties": [
"h",
"type",
"id",
"tiv",
"fg",
"tov",
"b",
"e",
"t"
],
"status": "CREATED",
"ttl": 0,
"enable_label_index": true,
"user_data": {
"~create_time": 1665222514003,
"~style": "{\"icon\":\"\",\"color\":\"#5c73e6\",\"size\":\"NORMAL\",\"display_fields\":[\"~id\"],\"join_symbols\":[\"-\"]}"
}
}
]
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the migrate command and the stack-trace entry points HugeGraphCommand.main, ToolUtil.printOrThrow, and ToolUtil.printExceptionStackIfNeeded. Compare the backup count with the restore count and inspect the failed edge-restore requests after 30 retries. Done means the migration completes without the failed-request or NoSuchElementException errors and restores the expected edge count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100