发现数据在index里面存在,但是Vertex没有

提问参考模版:

  • nebula 版本:v2.0.0-rc1
  • 部署方式(分布式 / 单机 / Docker / DBaaS):分布式
  • 是否为线上版本:Y

发现index里面可以找到数据。

(root@nebula) [atlas_online_space]> LOOKUP ON hive_column WHERE  hive_column.pr__typeName == 'hive_column' AND hive_column.Referenceable_dot___u_qualifiedName == 'tmp.lqh_recharge_top_user_list_tmp5.anchor_uid@bigocluster'
+----------------------------------------+
| VertexID                               |
+----------------------------------------+
| "bd96f17d-8bc7-4ecc-8e1d-b97c71c55588" |
+----------------------------------------+
Got 1 rows (time spent 5161/5450 us)

但是找不到顶点:

(root@nebula) [atlas_online_space]> fetch prop on * 'bd96f17d-8bc7-4ecc-8e1d-b97c71c55588'
Empty set (time spent 37353/37678 us)

Wed, 14 Jul 2021 10:29:54 CST

是不是有什么地方造成数据被删除了,但是index没有删掉?

加一个 yield子句试试,column不在索引里。

没有太理解,直接yield index里面的数据,肯定是有个。

(root@nebula) [atlas_online_space]> LOOKUP ON hive_column WHERE  hive_column.pr__typeName == 'hive_column' AND hive_column.Referenceable_dot___u_qualifiedName == 'tmp.lqh_recharge_top_user_list_tmp5.anchor_uid@bigocluster' yield hive_column.Referenceable_dot___u_qualifiedName
+----------------------------------------+--------------------------------------------------------------+
| VertexID                               | hive_column.Referenceable_dot___u_qualifiedName              |
+----------------------------------------+--------------------------------------------------------------+
| "bd96f17d-8bc7-4ecc-8e1d-b97c71c55588" | "tmp.lqh_recharge_top_user_list_tmp5.anchor_uid@bigocluster" |
+----------------------------------------+--------------------------------------------------------------+
Got 1 rows (time spent 6290/6669 us)

fetch 数据又找不到:

(root@nebula) [atlas_online_space]> fetch prop on hive_column 'bd96f17d-8bc7-4ecc-8e1d-b97c71c55588'  yield hive_column.Referenceable_dot___u_qualifiedName
Empty set (time spent 1586/1915 us)

感觉好像确实有问题。

这个deleteVertices里面没有加锁,但是把需要删除的index key已经给放到batchHolder里面了。

因为没有加锁,所以加到batchHolder里面之后,如果数据被修改了,indexKey发生了变化,会导致indexKey没有被删掉。

re-submit "Improved data write logic to avoid reading dirty data" by bright-starry-sky · Pull Request #525 · vesoft-inc/nebula-storage · GitHub 这个 pull request是不是就在修复这个问题?

1 个赞

推理正确!赞!

1 个赞

请问你们是在探索从atlas迁移到nebula吗?

是的,我们把Atlas底层图引擎换掉了

你们的修改有提交到社区吗?

这个有意思!
Atlas用的人还挺多的

该话题在最后一个回复创建后30天后自动关闭。不再允许新的回复。