提问参考模版:
- nebula 版本:v2.0.0-rc1
- 部署方式:单机compose
- 硬件信息
- 磁盘:SSD
- CPU、内存信息:Intel® Xeon® CPU E5-2630L v2 @ 2.40GHz、32G
- 问题的具体描述
准备试一下LOOKUP
寻找边的功能,就给givenName
边建立了索引,建立成功,但重建FAILED
。
1、建立索引
(root@nebula) [yago]> CREATE EDGE INDEX givenName_rank_index on givenName(rank);
Execution succeeded (time spent 8903/9792 us)
Fri, 15 Jan 2021 02:50:39 EST
2、重建索引
(root@nebula) [yago]> REBUILD EDGE INDEX givenName_rank_index;
+------------+
| New Job Id |
+------------+
| 363 |
+------------+
Got 1 rows (time spent 5897/6824 us)
Fri, 15 Jan 2021 02:51:22 EST
(root@nebula) [yago]> show job 363
+----------------+----------------------+----------+------------+------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+----------------------+----------+------------+------------+
| 363 | "REBUILD_EDGE_INDEX" | "FAILED" | 1610697082 | 1610697082 |
+----------------+----------------------+----------+------------+------------+
| 0 | "storaged1" | "FAILED" | 1610697082 | 1610697114 |
+----------------+----------------------+----------+------------+------------+
| 1 | "storaged2" | "FAILED" | 1610697082 | 1610697114 |
+----------------+----------------------+----------+------------+------------+
| 2 | "storaged0" | "FAILED" | 1610697082 | 1610697114 |
+----------------+----------------------+----------+------------+------------+
Got 4 rows (time spent 2969/4135 us)
Fri, 15 Jan 2021 02:51:33 EST
3、查询索引是否存在
(root@nebula) [yago]> show EDGE indexes
+------------------------+
| Names |
+------------------------+
| "givenName_rank_index" |
+------------------------+
Got 1 rows (time spent 2884/4319 us)
4、查询边类型是否存在:
(root@nebula) [yago]> LOOKUP ON Person WHERE Person.name == "Donald_Trump" | GO FROM $-.VertexID OVER givenName YIELD $-.VertexID AS startVid, givenName._dst AS endVID | FETCH PROP ON givenName $-.startVid -> $-.endVID;
+------------------------------------+------------------------------------+-----------------+----------------+
| givenName._src | givenName._dst | givenName._rank | givenName.rank |
+------------------------------------+------------------------------------+-----------------+----------------+
| "e51acdc4ae8125e4966b4feec468fcef" | "d6460d863cc7403c4d48eb8682d87784" | 0 | 100 |
+------------------------------------+------------------------------------+-----------------+----------------+
Got 1 rows (time spent 10211/11327 us)
5、BALANCE LEADER
后重建索引失败
(root@nebula) [yago]> balance leader
Execution succeeded (time spent 5060327/5060161 us)
Fri, 15 Jan 2021 02:53:13 EST
(root@nebula) [yago]> show hosts
+-------------+-----------+-----------+--------------+---------------------+------------------------+
| Host | Port | Status | Leader count | Leader distribution | Partition distribution |
+-------------+-----------+-----------+--------------+---------------------+------------------------+
| "storaged0" | 9779 | "ONLINE" | 10 | "dns:5, yago:5" | "dns:15, yago:15" |
+-------------+-----------+-----------+--------------+---------------------+------------------------+
| "storaged1" | 9779 | "ONLINE" | 10 | "dns:5, yago:5" | "dns:15, yago:15" |
+-------------+-----------+-----------+--------------+---------------------+------------------------+
| "storaged2" | 9779 | "ONLINE" | 10 | "dns:5, yago:5" | "dns:15, yago:15" |
+-------------+-----------+-----------+--------------+---------------------+------------------------+
| "Total" | __EMPTY__ | __EMPTY__ | 30 | "dns:15, yago:15" | "dns:45, yago:45" |
+-------------+-----------+-----------+--------------+---------------------+------------------------+
Got 4 rows (time spent 2492/3489 us)
Fri, 15 Jan 2021 02:53:18 EST
(root@nebula) [yago]> REBUILD EDGE INDEX givenName_rank_index;
+------------+
| New Job Id |
+------------+
| 365 |
+------------+
Got 1 rows (time spent 5889/7073 us)
Fri, 15 Jan 2021 02:53:22 EST
(root@nebula) [yago]> show job 365
+----------------+----------------------+----------+------------+------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+----------------------+----------+------------+------------+
| 365 | "REBUILD_EDGE_INDEX" | "FAILED" | 1610697202 | 1610697202 |
+----------------+----------------------+----------+------------+------------+
| 0 | "storaged1" | "FAILED" | 1610697202 | 1610697234 |
+----------------+----------------------+----------+------------+------------+
| 1 | "storaged0" | "FAILED" | 1610697202 | 1610697234 |
+----------------+----------------------+----------+------------+------------+
| 2 | "storaged2" | "FAILED" | 1610697202 | 1610697234 |
+----------------+----------------------+----------+------------+------------+
Got 4 rows (time spent 2360/3525 us)
6、手动Compact
之后重建索引失败
(root@nebula) [yago]> SUBMIT JOB COMPACT;
+------------+
| New Job Id |
+------------+
| 367 |
+------------+
Got 1 rows (time spent 5245/7397 us)
Fri, 15 Jan 2021 03:22:14 EST
(root@nebula) [yago]> show job 367
+----------------+---------------+-----------+------------+-----------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+---------------+-----------+------------+-----------+
| 367 | "COMPACT" | "RUNNING" | 1610698934 | 0 |
+----------------+---------------+-----------+------------+-----------+
Got 1 rows (time spent 3985/5294 us)
Fri, 15 Jan 2021 03:22:26 EST
(root@nebula) [yago]> show job 367
+----------------+---------------+------------+------------+------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+---------------+------------+------------+------------+
| 367 | "COMPACT" | "FINISHED" | 1610698934 | 1610699315 |
+----------------+---------------+------------+------------+------------+
| 0 | "storaged0" | "FINISHED" | 1610699315 | 1610699348 |
+----------------+---------------+------------+------------+------------+
| 1 | "storaged2" | "FINISHED" | 1610699315 | 1610699348 |
+----------------+---------------+------------+------------+------------+
| 2 | "storaged1" | "FINISHED" | 1610699315 | 1610699348 |
+----------------+---------------+------------+------------+------------+
Got 4 rows (time spent 3807/6269 us)
Fri, 15 Jan 2021 03:30:24 EST
(root@nebula) [yago]> REBUILD EDGE INDEX givenName_rank_index;
+------------+
| New Job Id |
+------------+
| 368 |
+------------+
Got 1 rows (time spent 6720/8729 us)
Fri, 15 Jan 2021 03:39:07 EST
(root@nebula) [yago]> show job 368
+----------------+----------------------+----------+------------+------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
+----------------+----------------------+----------+------------+------------+
| 368 | "REBUILD_EDGE_INDEX" | "FAILED" | 1610699947 | 1610699947 |
+----------------+----------------------+----------+------------+------------+
| 0 | "storaged2" | "FAILED" | 1610699947 | 1610699980 |
+----------------+----------------------+----------+------------+------------+
| 1 | "storaged1" | "FAILED" | 1610699947 | 1610699980 |
+----------------+----------------------+----------+------------+------------+
| 2 | "storaged0" | "FAILED" | 1610699947 | 1610699980 |
+----------------+----------------------+----------+------------+------------+
Got 4 rows (time spent 1950/2883 us)
Fri, 15 Jan 2021 03:39:14 EST