查询数据不一致

你好,已上传,麻烦看下,谢谢

你 profile 的 两个语句,都是带方向的。

profile match (v)-[e]->(v2) where id(v2) =='835688728' and id(v) =='905688798' return v,e,v2;
profile match (v)-[e]->(v2) where id(v) =='835688728' and id(v2) =='905688798' return v,e,v2;

当时确实是同样的情况,业务那边怀疑是由于扩容引起的

那你如果还碰到类似问题,再 profile 一下吧。
猜测原因,是插入数据时,反向边失败(比如 leader change) 导致的,如果想要避免可以开启 TOSS。

如果有这种情况,也可以用 go 验证

go from "905688798"  over * where dst(edge)=="835688728" yield properties(edge)
go from "835688728"  over * REVERSELY where src(edge)=="905688798" yield properties(edge)

这上面两个语句应该都能查出来,如果反向边查不出来,就是上面说的问题。

1 个赞

好的,谢谢

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。