已针对tag属性创建索引,但match匹配不到数据

(root@nebula) [basketballplayer]> match (v:player) where v.name == ‘Tim Duncan’ return v;
Empty set (time spent 1301/2538 us)

Wed, 16 Jun 2021 14:32:28 CST

(root@nebula) [basketballplayer]> fetch prop on player ‘play100’
Empty set (time spent 1129/2327 us)

Wed, 16 Jun 2021 14:33:07 CST

(root@nebula) [basketballplayer]> fetch prop on player ‘player100’
±---------------------------------------------------+
| vertices_ |
±---------------------------------------------------+
| (“player100” :player{age: 42, name: “Tim Duncan”}) |
±---------------------------------------------------+
Got 1 rows (time spent 1875/3041 us)

Wed, 16 Jun 2021 14:33:14 CST

(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]> lookup on player where player.name == ‘Tim Duncan’;
Empty set (time spent 1299/2674 us)

Wed, 16 Jun 2021 14:35:12 CST

(root@nebula) [basketballplayer]> lookup on player where player.name == ‘Tim Duncan’;
Empty set (time spent 1218/2443 us)

Wed, 16 Jun 2021 14:35:30 CST

(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]> rebuild tag index player_index_0;
±-----------+
| New Job Id |
±-----------+
| 61 |
±-----------+
Got 1 rows (time spent 7987/9164 us)

Wed, 16 Jun 2021 14:35:47 CST

(root@nebula) [basketballplayer]> rebuild tag index player_index_1;
±-----------+
| New Job Id |
±-----------+
| 62 |
±-----------+
Got 1 rows (time spent 14508/15729 us)

Wed, 16 Jun 2021 14:35:50 CST

(root@nebula) [basketballplayer]> show job 61
±---------------±--------------------±-----------±------------------------±------------------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
±---------------±--------------------±-----------±------------------------±------------------------+
| 61 | “REBUILD_TAG_INDEX” | “FINISHED” | 2021-06-16T06:18:11.000 | 2021-06-16T06:18:11.000 |
±---------------±--------------------±-----------±------------------------±------------------------+
| 0 | “10.xx.xx.15” | “FINISHED” | 2021-06-16T06:18:11.000 | 2021-06-16T06:20:34.000 |
±---------------±--------------------±-----------±------------------------±------------------------+
| 1 | “10.xx.xx.22” | “FINISHED” | 2021-06-16T06:18:11.000 | 2021-06-16T06:20:34.000 |
±---------------±--------------------±-----------±------------------------±------------------------+
| 2 | “10.xx.xx.114” | “FINISHED” | 2021-06-16T06:18:11.000 | 2021-06-16T06:20:34.000 |
±---------------±--------------------±-----------±------------------------±------------------------+
Got 4 rows (time spent 912/2127 us)

Wed, 16 Jun 2021 14:35:55 CST

(root@nebula) [basketballplayer]> show job 62
±---------------±--------------------±-----------±------------------------±------------------------+
| Job Id(TaskId) | Command(Dest) | Status | Start Time | Stop Time |
±---------------±--------------------±-----------±------------------------±------------------------+
| 62 | “REBUILD_TAG_INDEX” | “FINISHED” | 2021-06-16T06:18:14.000 | 2021-06-16T06:18:14.000 |
±---------------±--------------------±-----------±------------------------±------------------------+
| 0 | “10.xx.xx.15” | “FINISHED” | 2021-06-16T06:18:14.000 | 2021-06-16T06:20:37.000 |
±---------------±--------------------±-----------±------------------------±------------------------+
| 1 | “10.xx.xx.22” | “FINISHED” | 2021-06-16T06:18:14.000 | 2021-06-16T06:20:37.000 |
±---------------±--------------------±-----------±------------------------±------------------------+
| 2 | “10.xx.xx.114” | “FINISHED” | 2021-06-16T06:18:14.000 | 2021-06-16T06:20:37.000 |
±---------------±--------------------±-----------±------------------------±------------------------+
Got 4 rows (time spent 1117/2335 us)

Wed, 16 Jun 2021 14:35:58 CST

(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]> fetch prop on player ‘play100’
Empty set (time spent 1231/2351 us)

Wed, 16 Jun 2021 14:36:08 CST

(root@nebula) [basketballplayer]> fetch prop on player ‘player100’
±---------------------------------------------------+
| vertices_ |
±---------------------------------------------------+
| (“player100” :player{age: 42, name: “Tim Duncan”}) |
±---------------------------------------------------+
Got 1 rows (time spent 1075/2314 us)

Wed, 16 Jun 2021 14:36:13 CST

(root@nebula) [basketballplayer]> lookup on player where player.name == ‘Tim Duncan’;
Empty set (time spent 1103/2244 us)

Wed, 16 Jun 2021 14:36:17 CST

(root@nebula) [basketballplayer]> match (v:player) where v.name == ‘Tim Duncan’ return v;
Empty set (time spent 1274/2442 us)

Wed, 16 Jun 2021 14:36:26 CST

(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]> show create space basketballplayer
±-------------------±----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Space | Create Space |
±-------------------±----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| “basketballplayer” | “CREATE SPACE basketballplayer (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32), atomic_edge = false) ON default” |
±-------------------±----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Got 1 rows (time spent 915/2174 us)

Wed, 16 Jun 2021 14:38:20 CST

(root@nebula) [basketballplayer]>

专家您好,我今天使用官网的basketballplayer图空间的样例图数据重新创建结构和插入数据,图空间的vid是定长的32字节,结果还是fetch可以,lookup和match不出来,麻烦您可以在本地验证一下2.0.1的GA版本是否也有同样的问题,验证还是有bug,多谢

meta和storage的log中有异常吗?目前来看,当vid 长度为32时,insert是可以查出数据的,直接rebuild index时数据查不出来。是这样吗?

日志等我查下反馈,上次测试验证是vid 长度为不超过36时都可以查出来(您给的一个test_space样例),
insert是可以查出数据的,直接rebuild index时数据查不出来
–insert后,无论是否做rebuild,match和lookup都查不出来,只是fetch可以(不走索引)

meta日志没有发现错误
storage日志,只有下面这个算错误的信息,就没别的了
cannot fetch the last committed log id from the storage engine

很诡异,机器可以编译代码吗?要不调试一下?
我用v2.0.1的代码编译出来验证了一下,vid 64和rebuild都没有问题,这个代码版本就是现场的安装版本。目前来看,从log里貌似获取不到有效信息了。

专家:我想横向了解一下,这个v2.0.1现场安装版本,就我一个有这种问题吗,我的安装机器是3台vm,编译代码没有搞过,具体有部署链接指导吗

很诡异,发版前做过测试,没发现这个问题。按理说这个问题是很容易暴露出来的。
vid长度的问题头一次见;rebuild的问题,如果rebuild没成功Log里会有提示,比如LeaderChange啥的;

你的操作系统版本是什么?用的哪个nebula安装包?

集群os的版本是Ubuntu 18.04.5 LTS
安装的nebula的版本是nebula-graph-2.0.1.ubuntu1804.amd64.deb

您好是否和您们主流推荐的os不一样,或者您帮推荐一下最稳定的os的版本和安装包版本,我们重装os重新部署nebula吧,多谢

服务器上用 centos 系统的居多,如果要用 ubuntu 至少也要用 ubuntu 的 server 版,不要选择桌面版。

nebula 只要选择对应系统的安装包即可,目前推荐的是 2.0.1 版本

我想使用centos7.x版本的都符合要求吧?,然后重装nebula 2.0.1版本,再试一下

(root@nebula) [(none)]> create space basketballplayer(partition_num=10,replica_factor=1,vid_type=fixed_string(32));
Execution succeeded (time spent 5604/6734 us)

Thu, 17 Jun 2021 10:46:00 CST

(root@nebula) [(none)]> use basketballplayer;
Execution succeeded (time spent 1059/4270 us)

Thu, 17 Jun 2021 10:54:39 CST

(root@nebula) [basketballplayer]> create tag player(name string,age int);
Execution succeeded (time spent 13039/14123 us)

Thu, 17 Jun 2021 10:54:49 CST

(root@nebula) [basketballplayer]> create tag team(name string);
Execution succeeded (time spent 8581/9587 us)

Thu, 17 Jun 2021 10:54:49 CST

(root@nebula) [basketballplayer]> create edge serve(start_year int,end_year int);
Execution succeeded (time spent 10493/11382 us)

Thu, 17 Jun 2021 10:54:49 CST

(root@nebula) [basketballplayer]> create edge follow(degree int);
Execution succeeded (time spent 10051/11021 us)

Thu, 17 Jun 2021 10:54:50 CST

(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]> create tag index player_index_0 on player();
Execution succeeded (time spent 6838/10907 us)

Thu, 17 Jun 2021 10:59:04 CST

(root@nebula) [basketballplayer]> create tag index player_index_1 on player(name(20));
Execution succeeded (time spent 6605/8344 us)

Thu, 17 Jun 2021 10:59:04 CST

(root@nebula) [basketballplayer]> insert vertex player(name,age) values “player100”:(“Tim Duncan”, 42);
Execution succeeded (time spent 3767/4885 us)

Thu, 17 Jun 2021 11:02:11 CST

(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]> fetch on player ‘player100’
[ERROR (-7)]: SyntaxError: syntax error near `on’

Thu, 17 Jun 2021 11:02:41 CST

(root@nebula) [basketballplayer]> fetch prop on player ‘player100’
±---------------------------------------------------+
| vertices_ |
±---------------------------------------------------+
| (“player100” :player{age: 42, name: “Tim Duncan”}) |
±---------------------------------------------------+
Got 1 rows (time spent 1980/4968 us)

Thu, 17 Jun 2021 11:03:13 CST

(root@nebula) [basketballplayer]> match (v:player) where v.name == ‘Tim Duncan’ return v;
Empty set (time spent 3976/5105 us)

Thu, 17 Jun 2021 11:03:38 CST

(root@nebula) [basketballplayer]> lookup on player where player.name == ‘Tim Duncan’
Empty set (time spent 1854/2977 us)

Thu, 17 Jun 2021 11:04:24 CST

(root@nebula) [basketballplayer]>

(root@nebula) [basketballplayer]> SHOW TAG INDEX STATUS;
Empty set (time spent 1081/2178 us)

Thu, 17 Jun 2021 11:06:49 CST

(root@nebula) [basketballplayer]> show tags
±---------+
| Name |
±---------+
| “player” |
±---------+
| “team” |
±---------+
Got 2 rows (time spent 990/3614 us)

Thu, 17 Jun 2021 11:06:58 CST

(root@nebula) [basketballplayer]> show edges;
±---------+
| Name |
±---------+
| “follow” |
±---------+
| “serve” |
±---------+
Got 2 rows (time spent 815/3558 us)

Thu, 17 Jun 2021 11:07:07 CST

(root@nebula) [basketballplayer]> show create space basketballplayer
±-------------------±----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Space | Create Space |
±-------------------±----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| “basketballplayer” | “CREATE SPACE basketballplayer (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin, vid_type = FIXED_STRING(32), atomic_edge = false) ON default” |
±-------------------±----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Got 1 rows (time spent 828/2144 us)

Thu, 17 Jun 2021 11:07:31 CST

(root@nebula) [basketballplayer]> rebuild tag index
±-----------+
| New Job Id |
±-----------+
| 24 |
±-----------+
Got 1 rows (time spent 7423/9075 us)

Thu, 17 Jun 2021 11:08:09 CST

(root@nebula) [basketballplayer]> rebuild tag index player_index_0
±-----------+
| New Job Id |
±-----------+
| 25 |
±-----------+
Got 1 rows (time spent 2964/4020 us)

Thu, 17 Jun 2021 11:08:13 CST

(root@nebula) [basketballplayer]> rebuild tag index player_index_1
±-----------+
| New Job Id |
±-----------+
| 26 |
±-----------+
Got 1 rows (time spent 6653/7920 us)

Thu, 17 Jun 2021 11:08:15 CST

(root@nebula) [basketballplayer]>
(root@nebula) [basketballplayer]> lookup on player where player.name == ‘Tim Duncan’
Empty set (time spent 15521/16629 us)

Thu, 17 Jun 2021 11:08:53 CST

(root@nebula) [basketballplayer]> match (v:player) where v.name == ‘Tim Duncan’ return v;
Empty set (time spent 15313/17752 us)

Thu, 17 Jun 2021 11:09:20 CST

(root@nebula) [basketballplayer]> match (v:player) where v.name == ‘Tim Duncan’ return v.name;
Empty set (time spent 1831/2929 us)

Thu, 17 Jun 2021 11:09:24 CST

(root@nebula) [basketballplayer]>

专家您好,我想到我们生产环境的nebula集群也部署好了,生产主机os是centos7.5的,部署的nebula也是2.0.1版本,结果和测试环境的Ubuntu的nebula的现象一致,都是fetch’可以,match和lookup都无法返回结果,
所以这个问题应该不是个案吧?是很明显的问题了

我记得上次在线支持后,改成vid长度改成32后,所有集群机器都可以运行成功,为什么又出现这个问题了?和当时的测试有什么区别吗?

这个是编译的帮助手册,可以编译一个debug版本调试一下:
https://docs.nebula-graph.io/2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code/

我记得上次在线支持后,改成vid长度改成32后,所有集群机器都可以运行成功,为什么又出现这个问题了?和当时的测试有什么区别吗?

这个情况是之前的space确实ok,而且弄到生产的centos环境下跑也ok,但官网的篮球运动员的图空间就又不行,测试和生产环境都不行,vid长度是设置的32

需要调试一下代码,这个版本我编译验证了一下,没有发现上边提到的问题。

浙ICP备20010487号