Star

UNION子句中存在函数参数类型不匹配,导致查询hang住

  • nebula 版本:1.0.1

  • 部署方式:分布式 3台机器,每台机器各有meta,storage,graph

  • 硬件信息:无关

  • 出问题的 Space 的创建方式:

CREATE SPACE nba_hive (partition_num = 10, replica_factor = 1, charset = utf8, collate = utf8_bin);
USE nba_hive;
CREATE TAG player ( id int, name string, age int );
CREATE TAG team ( id int, name string );
CREATE EDGE follow ( source_id int, target_id int, degree int );
CREATE EDGE serve ( source_id int, target_id int, ranking int, start_year int, end_year int );
CREATE TAG INDEX player_index_0 ON player(name)

insert vertex player(id, name, age) values 1001:(1001, 'AAA', 20)
insert vertex player(id, name, age) values 1002:(1002, 'BBB', 20)
insert vertex player(id, name, age) values 1003:(1003, 'CCC', 20)
insert edge follow(source_id, target_id, degree) values 1001->1002:(1001, 1002, 1)
insert edge follow(source_id, target_id, degree) values 1001->1003:(1001, 1003, 1)
  • 问题的具体描述:

Case 1:

$var1 = go from 1001 over follow yield follow._dst as dst;
$var2 = yield left((string)$var1.dst, 4) + "x" union yield left((string)$var1.dst, 4) + "y";
yield $var2.*;

上述语句返回正常结果,符合预期。

Case 2:

$var1 = go from 1001 over follow yield follow._dst as dst;
$var2 = yield left($var1.dst, 4) + "x";
yield $var2.*;

现象:

[ERROR (-8)]: Exception when handle out-bounds/in-bounds: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_7bad_getEEEEE: boost::bad_get: failed value get using boost::get.

问题:
提示信息不友好,语句的错误是传入left函数的参数非string类型,是否可以优化。

Case 3:

$var1 = go from 1001 over follow yield follow._dst as dst;
$var2 = yield left((string)$var1.dst, 4) + "x" union yield left($var1.dst, 4) + "y";
yield $var2.*;

现象:长时间hang住不动。

问题:UNION子句中存在运行时错误时hang住,迅速耗尽线程池且无错误提示,难以排查问题,是否可以优化。

很好的问题,非常感谢您的使用和反馈,相关优化事项会告知有关研发同学进行优化~
@jude-zhu PM小姐姐来收集需求啦

感谢您的反馈,
https://github.com/vesoft-inc/nebula/pull/2362 修复该问题。

浙ICP备20010487号