lookup 与 fetch 查出的结果不一致,非空属性查出的结果却为NULL

  • nebula 版本:(为节省回复者核对版本信息的时间,首次发帖的版本信息记得以截图形式展示)

  • 部署方式:单机

  • 是否为线上版本:N

  • 硬件信息

    • HDD磁盘
    • CPU、内存信息
  • 问题的具体描述
    使用lookup查询出字段为NULL的结果
    步骤如下:

  1. 创建图空间,点,边,索引,等:
CREATE SPACE IF NOT EXISTS ip_conversation(partition_num = 1,replica_factor = 1,vid_type = FIXED_STRING(64));
CREATE TAG IF NOT EXISTS ipv4 (ipv4_addr_integer int NOT NULL, ipv4_addr_string string NOT NULL, insert_time timestamp NOT NULL default 0);
CREATE TAG INDEX IF NOT EXISTS i_ipv4_addr_integer ON ipv4 (ipv4_addr_integer);
CREATE TAG INDEX IF NOT EXISTS i_ipv4_addr_string ON ipv4(ipv4_addr_string(8));
CREATE EDGE IF NOT EXISTS conversation (insert_time timestamp NOT NULL default 0, established_sessions int NOT NULL default 0, total_bytes int NOT NULL default 0);
CREATE EDGE INDEX IF NOT EXISTS i_conversation ON conversation(insert_time, established_sessions, total_bytes);
  1. 插入点,边
INSERT VERTEX ipv4(ipv4_addr_integer, ipv4_addr_string, insert_time) VALUES "9.255.255.52":(167771956, "9.255.255.52", 1632920220),"10.0.1.155":(167772571, "10.0.1.155", 1632920220),"9.255.255.53":(167771957, "9.255.255.53", 1632920220),"10.0.1.154":(167772570, "10.0.1.154", 1632920220),"9.255.255.54":(167771958, "9.255.255.54", 1632920220),"10.0.1.153":(167772569, "10.0.1.153", 1632920220),"9.255.255.55":(167771959, "9.255.255.55", 1632920220),"10.0.1.152":(167772568, "10.0.1.152", 1632920220),"9.255.255.56":(167771960, "9.255.255.56", 1632920220),"10.0.1.151":(167772567, "10.0.1.151", 1632920220),"9.255.255.57":(167771961, "9.255.255.57", 1632920220),"10.0.1.150":(167772566, "10.0.1.150", 1632920220),"9.255.255.58":(167771962, "9.255.255.58", 1632920220),"10.0.1.149":(167772565, "10.0.1.149", 1632920220),"9.255.255.59":(167771963, "9.255.255.59", 1632920220),"10.0.1.148":(167772564, "10.0.1.148", 1632920220),"9.255.255.60":(167771964, "9.255.255.60", 1632920220),"10.0.1.147":(167772563, "10.0.1.147", 1632920220),"9.255.255.61":(167771965, "9.255.255.61", 1632920220),"10.0.1.146":(167772562, "10.0.1.146", 1632920220),"9.255.255.62":(167771966, "9.255.255.62", 1632920220),"10.0.1.145":(167772561, "10.0.1.145", 1632920220),"9.255.255.63":(167771967, "9.255.255.63", 1632920220),"10.0.1.144":(167772560, "10.0.1.144", 1632920220),"9.255.255.64":(167771968, "9.255.255.64", 1632920220),"10.0.1.143":(167772559, "10.0.1.143", 1632920220),"9.255.255.65":(167771969, "9.255.255.65", 1632920220),"10.0.1.142":(167772558, "10.0.1.142", 1632920220),"9.255.255.66":(167771970, "9.255.255.66", 1632920220),"10.0.1.141":(167772557, "10.0.1.141", 1632920220),"9.255.255.67":(167771971, "9.255.255.67", 1632920220),"10.0.1.140":(167772556, "10.0.1.140", 1632920220),"9.255.255.68":(167771972, "9.255.255.68", 1632920220),"10.0.1.139":(167772555, "10.0.1.139", 1632920220),"9.255.255.69":(167771973, "9.255.255.69", 1632920220),"10.0.1.138":(167772554, "10.0.1.138", 1632920220),"9.255.255.70":(167771974, "9.255.255.70", 1632920220),"10.0.1.137":(167772553, "10.0.1.137", 1632920220),"9.255.255.71":(167771975, "9.255.255.71", 1632920220),"10.0.1.136":(167772552, "10.0.1.136", 1632920220)
INSERT EDGE conversation(insert_time, established_sessions, total_bytes) VALUES "9.255.255.52"->"10.0.1.155"@1632920220:(1632920220, 1, 172465),"9.255.255.53"->"10.0.1.154"@1632920220:(1632920220, 1, 413152),"9.255.255.54"->"10.0.1.153"@1632920220:(1632920220, 1, 413152),"9.255.255.55"->"10.0.1.152"@1632920220:(1632920220, 1, 413152),"9.255.255.56"->"10.0.1.151"@1632920220:(1632920220, 1, 413152),"9.255.255.57"->"10.0.1.150"@1632920220:(1632920220, 1, 413152),"9.255.255.58"->"10.0.1.149"@1632920220:(1632920220, 1, 413152),"9.255.255.59"->"10.0.1.148"@1632920220:(1632920220, 1, 413152),"9.255.255.60"->"10.0.1.147"@1632920220:(1632920220, 1, 413152),"9.255.255.61"->"10.0.1.146"@1632920220:(1632920220, 1, 413152),"9.255.255.62"->"10.0.1.145"@1632920220:(1632920220, 1, 413152),"9.255.255.63"->"10.0.1.144"@1632920220:(1632920220, 1, 413152),"9.255.255.64"->"10.0.1.143"@1632920220:(1632920220, 1, 413152),"9.255.255.65"->"10.0.1.142"@1632920220:(1632920220, 1, 413152),"9.255.255.66"->"10.0.1.141"@1632920220:(1632920220, 1, 413152),"9.255.255.67"->"10.0.1.140"@1632920220:(1632920220, 1, 413152),"9.255.255.68"->"10.0.1.139"@1632920220:(1632920220, 1, 413152),"9.255.255.69"->"10.0.1.138"@1632920220:(1632920220, 1, 413152),"9.255.255.70"->"10.0.1.137"@1632920220:(1632920220, 1, 413152),"9.255.255.71"->"10.0.1.136"@1632920220:(1632920220, 0, 24291)

3.使用lookup查询

lookup on conversation yield conversation.established_sessions as established_sessions,conversation.total_bytes as total_bytes,conversation.insert_time as insert_time

发现结果如下:


但是使用fetch进行查询9.255.255.52到10.0.1.155的边

fetch prop on conversation "9.255.255.52"->"10.0.1.155"@1632920220

结果如下,查出的值并不为NULL

我有几点疑惑
(1)为什么lookup和fetch查出的结果不一样?
(2)为什么lookup查询的边的属性的值为NULL?我在创建边的时候指定了NOT NULL的
初步怀疑是不是我创建点、边,或者创建索引、或者插入点,边的时候有什么问题,所以想请教一下各位

是一个隐藏了很久的Bug,感谢反馈。这个bug fix的PR将会在今晚提上去。

2 个赞

好的,非常感谢。请问现在的版本可以用了吗?

你好,请问这个问题在什么条件下会触发?我们这边看能不能先规避一下