Star

drop TAG之后,节点删掉了,但是连接的边没有删除

  • nebula 版本:v2-nightly
  • 部署方式(分布式 / 单机 / Docker / DBaaS):分布式
  • 问题的具体描述
    我新建了一种节点student,建立了边like,其中包含三个节点和两条边。然后我使用drop TAG student的方式删掉了这个TAG(所有节点均只包含这一个TAG),show stats之后发现student没有了,但是like的两条边仍然能查到,其首尾节点均已失效。
    希望可以设置策略,当唯一TAG删除之后,其相关所有边缘也都删除。
    日志如下:
[2021-01-06 15:03:55,965]:loading stats ...
+-------+-------------+-------+
|  Type |     Name    | Count |
+-------+-------------+-------+
|  Tag  |   company   |  3188 |
|  Tag  |   concept   |  163  |
|  Tag  |    person   | 20873 |
|  Tag  |   student   |   3   |  (这一行在下面删掉了!)
|  Edge |  concept_of |  9442 |
|  Edge |  employ_of  | 21418 |
|  Edge | industry_of |  2908 |
|  Edge |     like    |   2   |
| Space |   vertices  | 24227 |
| Space |    edges    | 33770 |
+-------+-------------+-------+
>>> nebula_db.drop_tag("student")
[2021-01-06 15:04:16,143]:student TAG drop success!
>>> nebula_db.show_stats('stock')
[2021-01-06 15:04:18,325]:loading stats ...
+-------+-------------+-------+
|  Type |     Name    | Count |
+-------+-------------+-------+
|  Tag  |   company   |  3188 |
|  Tag  |   concept   |  163  |
|  Tag  |    person   | 20873 |
|  Edge |  concept_of |  9442 |
|  Edge |  employ_of  | 21418 |
|  Edge | industry_of |  2908 |
|  Edge |     like    |   2   |
| Space |   vertices  | 24224 |  (总结点数减少,但是总边数未减少)
| Space |    edges    | 33770 |
+-------+-------------+-------+
(root@nebula) [stock]> FETCH PROP ON like "xxxxx2"->"xxxxxx3"
+-----------+-----------+------------+---------------+
| like._src | like._dst | like._rank | like.likeness |
+-----------+-----------+------------+---------------+
| "xxxxx2"  | "xxxxxx3" | 0          | 70.0          |
+-----------+-----------+------------+---------------+
Got 1 rows (time spent 2411/3317 us)

Wed, 06 Jan 2021 15:04:50 CST

(root@nebula) [stock]> FETCH PROP ON student "xxxxx2"
[ERROR (-8)]: TagName `student'  is nonexistent

Wed, 06 Jan 2021 15:05:08 CST

您的需求已经记录了

目前的设计 就是这样的,删除点不删除相关的边,是可以悬挂边的。之后会改。

1赞

好的好的,但是我看如果不是删除TAG,直接删除VID的话是会自动删掉所有连接的边这样,就咨询一下

浙ICP备20010487号