Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngbatis执行结果与nebula不一致 #78

Closed
llinzhe opened this issue Nov 2, 2022 · 76 comments
Closed

ngbatis执行结果与nebula不一致 #78

llinzhe opened this issue Nov 2, 2022 · 76 comments

Comments

@llinzhe
Copy link

llinzhe commented Nov 2, 2022

ngbatis打印日志:

image

# nebula执行

image

都是在rebuild index之后执行。

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 2, 2022

:param p0 => 'account001';
MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

试试这个?

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 2, 2022

打印出来的 result 是最原始的 ResultSet,在做 orm 处理之前,
出现不一致的情况有点不太好排查。

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;
- nGql:USE userProfile;
	MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n; 
 - params: {p0=account001}
 - result:ColumnName: [n], Rows: []

这个还是不行

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

打印出来的 result 是最原始的 ResultSet,在做 orm 处理之前, 出现不一致的情况有点不太好排查。

嗯嗯,session的执行结果就是null了。这点比较奇怪

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 2, 2022

接口返回结果有吗,应该不会是toString的问题吧

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

接口返回结果有吗,应该不会是toString的问题吧

我打个断点看看~

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

接口返回结果有吗,应该不会是toString的问题吧

{"columnNames":["n"],"empty":true,"comment":"","spaceName":"userProfile","latency":1881,"planDesc":null,"errorCode":0,"succeeded":true,"errorMessage":"","rows":[]}

返回的时候就是[]了

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 2, 2022

:param p0 => 'account001';
MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

那这个在console执行有值吗,在想会不会是参数类型的问题

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

:param p0 => 'account001';
MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

那这个在console执行有值吗,在想会不会是参数类型的问题

这个也是没有值的~

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 2, 2022

:param p0 => 'account001';
MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

那这个在console执行有值吗,在想会不会是参数类型的问题

这个也是没有值的~

会不会是cypher param的问题@wey-gu
可以提供一下nebula的版本吗@llinzhe

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

:param p0 => 'account001';
MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

image

版本是3.2.0

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

版本:3.2.0

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 2, 2022

你先把 $p0换成 '${p0}',可以避开这个问题,两种参数替换的机制不一样。

'${p0}' 是执行前替换。
$p0 是执行到数据库时,由数据库替换。
如果参数是数字,单引号可以不用

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

嗯嗯 改为'${p0}'后可以成功获取数据。

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

你先把 换成p0换成′{p0}',可以避开这个问题,两种参数替换的机制不一样。

'${p0}' 是执行前替换。 $p0 是执行到数据库时,由数据库替换。 如果参数是数字,单引号可以不用

感谢~

@wey-gu
Copy link
Member

wey-gu commented Nov 2, 2022

:param p0 => 'account001';
MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

那这个在console执行有值吗,在想会不会是参数类型的问题

这个也是没有值的~

可以 profile 一下这个 查询么?

profile MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

profile MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

(root@nebula) [userProfile]> profile MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;
+---+
| n |
+---+
+---+
Empty set (time spent 1776/2263 us)

Execution Plan (optimize time 128 us)

-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
| id | name           | dependencies | profiling data                                                                                                                                                         | operator info                           |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  6 | Project        | 5            | ver: 0, rows: 0, execTime: 10us, totalTime: 12us                                                                                                                       | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Project_6"                 |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __Filter_5                    |
|    |                |              |                                                                                                                                                                        | columns: [                              |
|    |                |              |                                                                                                                                                                        |   "$n"                                  |
|    |                |              |                                                                                                                                                                        | ]                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  5 | Filter         | 8            | ver: 0, rows: 0, execTime: 3us, totalTime: 4us                                                                                                                         | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Filter_5"                  |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __Project_4                   |
|    |                |              |                                                                                                                                                                        | condition: (n.account.accountUuid==$p0) |
|    |                |              |                                                                                                                                                                        | isStable: false                         |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  8 | AppendVertices | 1            | ver: 0, rows: 0, execTime: 12us, totalTime: 14us                                                                                                                       | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Project_4"                 |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __IndexScan_1                 |
|    |                |              |                                                                                                                                                                        | space: 1                                |
|    |                |              |                                                                                                                                                                        | dedup: true                             |
|    |                |              |                                                                                                                                                                        | limit: -1                               |
|    |                |              |                                                                                                                                                                        | filter: account._tag IS NOT EMPTY       |
|    |                |              |                                                                                                                                                                        | orderBy: []                             |
|    |                |              |                                                                                                                                                                        | src: $_vid                              |
|    |                |              |                                                                                                                                                                        | props: [                                |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "token",                          |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 5                          |
|    |                |              |                                                                                                                                                                        |   },                                    |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "accountUuid",                    |
|    |                |              |                                                                                                                                                                        |       "create_time",                    |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 2                          |
|    |                |              |                                                                                                                                                                        |   },                                    |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "accountUuid",                    |
|    |                |              |                                                                                                                                                                        |       "createTime",                     |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 13                         |
|    |                |              |                                                                                                                                                                        |   }                                     |
|    |                |              |                                                                                                                                                                        | ]                                       |
|    |                |              |                                                                                                                                                                        | exprs:                                  |
|    |                |              |                                                                                                                                                                        | vertex_filter:                          |
|    |                |              |                                                                                                                                                                        | if_track_previous_path: false           |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  1 | IndexScan      | 2            | {                                                                                                                                                                      | outputVar: {                            |
|    |                |              | ver: 0, rows: 0, execTime: 0us, totalTime: 1038us                                                                                                                      |   "colNames": [                         |
|    |                |              | storage_detail: {IndexLimitNode(limit=9223372036854775807):145(us),IndexProjectionNode(projectColumn=[_vid]):145(us),IndexVertexScanNode(IndexID=14, Path=()):148(us)} |     "_vid"                              |
|    |                |              | "127.0.0.1":9779 exec/total: 219(us)/922(us)                                                                                                                           |   ],                                    |
|    |                |              | }                                                                                                                                                                      |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__IndexScan_1"               |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar:                               |
|    |                |              |                                                                                                                                                                        | space: 1                                |
|    |                |              |                                                                                                                                                                        | dedup: false                            |
|    |                |              |                                                                                                                                                                        | limit: 9223372036854775807              |
|    |                |              |                                                                                                                                                                        | filter:                                 |
|    |                |              |                                                                                                                                                                        | orderBy: []                             |
|    |                |              |                                                                                                                                                                        | schemaId: 13                            |
|    |                |              |                                                                                                                                                                        | isEdge: false                           |
|    |                |              |                                                                                                                                                                        | returnCols: [                           |
|    |                |              |                                                                                                                                                                        |   "_vid"                                |
|    |                |              |                                                                                                                                                                        | ]                                       |
|    |                |              |                                                                                                                                                                        | indexCtx: [                             |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "columnHints": [],                  |
|    |                |              |                                                                                                                                                                        |     "filter": "",                       |
|    |                |              |                                                                                                                                                                        |     "index_id": 14                      |
|    |                |              |                                                                                                                                                                        |   }                                     |
|    |                |              |                                                                                                                                                                        | ]                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  2 | Start          |              | ver: 0, rows: 0, execTime: 0us, totalTime: 28us                                                                                                                        | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [],                       |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Start_2"                   |
|    |                |              |                                                                                                                                                                        | }                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------

Wed, 02 Nov 2022 07:58:27 EDT

@wey-gu
Copy link
Member

wey-gu commented Nov 2, 2022

profile MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

(root@nebula) [userProfile]> profile MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;
+---+
| n |
+---+
+---+
Empty set (time spent 1776/2263 us)

Execution Plan (optimize time 128 us)

-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
| id | name           | dependencies | profiling data                                                                                                                                                         | operator info                           |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  6 | Project        | 5            | ver: 0, rows: 0, execTime: 10us, totalTime: 12us                                                                                                                       | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Project_6"                 |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __Filter_5                    |
|    |                |              |                                                                                                                                                                        | columns: [                              |
|    |                |              |                                                                                                                                                                        |   "$n"                                  |
|    |                |              |                                                                                                                                                                        | ]                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  5 | Filter         | 8            | ver: 0, rows: 0, execTime: 3us, totalTime: 4us                                                                                                                         | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Filter_5"                  |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __Project_4                   |
|    |                |              |                                                                                                                                                                        | condition: (n.account.accountUuid==$p0) |
|    |                |              |                                                                                                                                                                        | isStable: false                         |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  8 | AppendVertices | 1            | ver: 0, rows: 0, execTime: 12us, totalTime: 14us                                                                                                                       | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Project_4"                 |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __IndexScan_1                 |
|    |                |              |                                                                                                                                                                        | space: 1                                |
|    |                |              |                                                                                                                                                                        | dedup: true                             |
|    |                |              |                                                                                                                                                                        | limit: -1                               |
|    |                |              |                                                                                                                                                                        | filter: account._tag IS NOT EMPTY       |
|    |                |              |                                                                                                                                                                        | orderBy: []                             |
|    |                |              |                                                                                                                                                                        | src: $_vid                              |
|    |                |              |                                                                                                                                                                        | props: [                                |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "token",                          |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 5                          |
|    |                |              |                                                                                                                                                                        |   },                                    |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "accountUuid",                    |
|    |                |              |                                                                                                                                                                        |       "create_time",                    |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 2                          |
|    |                |              |                                                                                                                                                                        |   },                                    |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "accountUuid",                    |
|    |                |              |                                                                                                                                                                        |       "createTime",                     |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 13                         |
|    |                |              |                                                                                                                                                                        |   }                                     |
|    |                |              |                                                                                                                                                                        | ]                                       |
|    |                |              |                                                                                                                                                                        | exprs:                                  |
|    |                |              |                                                                                                                                                                        | vertex_filter:                          |
|    |                |              |                                                                                                                                                                        | if_track_previous_path: false           |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  1 | IndexScan      | 2            | {                                                                                                                                                                      | outputVar: {                            |
|    |                |              | ver: 0, rows: 0, execTime: 0us, totalTime: 1038us                                                                                                                      |   "colNames": [                         |
|    |                |              | storage_detail: {IndexLimitNode(limit=9223372036854775807):145(us),IndexProjectionNode(projectColumn=[_vid]):145(us),IndexVertexScanNode(IndexID=14, Path=()):148(us)} |     "_vid"                              |
|    |                |              | "127.0.0.1":9779 exec/total: 219(us)/922(us)                                                                                                                           |   ],                                    |
|    |                |              | }                                                                                                                                                                      |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__IndexScan_1"               |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar:                               |
|    |                |              |                                                                                                                                                                        | space: 1                                |
|    |                |              |                                                                                                                                                                        | dedup: false                            |
|    |                |              |                                                                                                                                                                        | limit: 9223372036854775807              |
|    |                |              |                                                                                                                                                                        | filter:                                 |
|    |                |              |                                                                                                                                                                        | orderBy: []                             |
|    |                |              |                                                                                                                                                                        | schemaId: 13                            |
|    |                |              |                                                                                                                                                                        | isEdge: false                           |
|    |                |              |                                                                                                                                                                        | returnCols: [                           |
|    |                |              |                                                                                                                                                                        |   "_vid"                                |
|    |                |              |                                                                                                                                                                        | ]                                       |
|    |                |              |                                                                                                                                                                        | indexCtx: [                             |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "columnHints": [],                  |
|    |                |              |                                                                                                                                                                        |     "filter": "",                       |
|    |                |              |                                                                                                                                                                        |     "index_id": 14                      |
|    |                |              |                                                                                                                                                                        |   }                                     |
|    |                |              |                                                                                                                                                                        | ]                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  2 | Start          |              | ver: 0, rows: 0, execTime: 0us, totalTime: 28us                                                                                                                        | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [],                       |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Start_2"                   |
|    |                |              |                                                                                                                                                                        | }                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------

Wed, 02 Nov 2022 07:58:27 EDT

能看下 索引的 rebuild job 成功了么?

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

profile

(root@nebula) [userProfile]> show jobs
+--------+---------------------+------------+----------------------------+----------------------------+
| Job Id | Command | Status | Start Time | Stop Time |
+--------+---------------------+------------+----------------------------+----------------------------+
| 9 | "REBUILD_TAG_INDEX" | "FINISHED" | 2022-11-02T09:14:29.000000 | 2022-11-02T09:14:30.000000 |
| 8 | "REBUILD_TAG_INDEX" | "FINISHED" | 2022-11-02T09:13:05.000000 | 2022-11-02T09:13:06.000000 |
| 7 | "REBUILD_TAG_INDEX" | "FINISHED" | 2022-11-02T08:43:22.000000 | 2022-11-02T08:43:23.000000 |
+--------+---------------------+------------+----------------------------+----------------------------+
Got 3 rows (time spent 1580/2380 us)

@wey-gu
Copy link
Member

wey-gu commented Nov 2, 2022

除了所以呢返回 row 0 的问题
这里还有一个 column hint 的问题,您能用刚发布的 3.3.0 测试一下么?替换二进制重启就行,麻烦也帮忙 profile 一下

另外,帮忙

YIELD $p0

一下

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

除了所以呢返回 row 0 的问题 这里还有一个 column hint 的问题,您能用刚发布的 3.3.0 测试一下么?替换二进制重启就行,麻烦也帮忙 profile 一下

console还是nebula?

@wey-gu
Copy link
Member

wey-gu commented Nov 2, 2022

除了所以呢返回 row 0 的问题 这里还有一个 column hint 的问题,您能用刚发布的 3.3.0 测试一下么?替换二进制重启就行,麻烦也帮忙 profile 一下

console还是nebula?

NebulaGraph 内核

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022


[root@localhost ~]# sudo rpm -Uvh nebula-graph-3.3.0.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:nebula-graph-3.3.0-1             ################################# [ 50%]
Cleaning up / removing...
   2:nebula-graph-3.2.0-1             ################################# [100%]
> profile MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;

(root@nebula) [userProfile]> profile MATCH (n: account) WHERE n.account.accountUuid == $p0 RETURN n;
+---+
| n |
+---+
+---+
Empty set (time spent 2355/2783 us)

Execution Plan (optimize time 123 us)

-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
| id | name           | dependencies | profiling data                                                                                                                                                         | operator info                           |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  6 | Project        | 5            | ver: 0, rows: 0, execTime: 11us, totalTime: 13us                                                                                                                       | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Project_6"                 |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __Filter_5                    |
|    |                |              |                                                                                                                                                                        | columns: [                              |
|    |                |              |                                                                                                                                                                        |   "$n"                                  |
|    |                |              |                                                                                                                                                                        | ]                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  5 | Filter         | 8            | ver: 0, rows: 0, execTime: 8us, totalTime: 11us                                                                                                                        | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Filter_5"                  |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __Project_4                   |
|    |                |              |                                                                                                                                                                        | condition: (n.account.accountUuid==$p0) |
|    |                |              |                                                                                                                                                                        | isStable: false                         |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  8 | AppendVertices | 1            | ver: 0, rows: 0, execTime: 35us, totalTime: 41us                                                                                                                       | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [                         |
|    |                |              |                                                                                                                                                                        |     "n"                                 |
|    |                |              |                                                                                                                                                                        |   ],                                    |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Project_4"                 |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar: __IndexScan_1                 |
|    |                |              |                                                                                                                                                                        | space: 1                                |
|    |                |              |                                                                                                                                                                        | dedup: true                             |
|    |                |              |                                                                                                                                                                        | limit: -1                               |
|    |                |              |                                                                                                                                                                        | filter: account._tag IS NOT EMPTY       |
|    |                |              |                                                                                                                                                                        | orderBy: []                             |
|    |                |              |                                                                                                                                                                        | src: $_vid                              |
|    |                |              |                                                                                                                                                                        | props: [                                |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "accountUuid",                    |
|    |                |              |                                                                                                                                                                        |       "createTime",                     |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 13                         |
|    |                |              |                                                                                                                                                                        |   },                                    |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "token",                          |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 5                          |
|    |                |              |                                                                                                                                                                        |   },                                    |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "props": [                          |
|    |                |              |                                                                                                                                                                        |       "accountUuid",                    |
|    |                |              |                                                                                                                                                                        |       "create_time",                    |
|    |                |              |                                                                                                                                                                        |       "_tag"                            |
|    |                |              |                                                                                                                                                                        |     ],                                  |
|    |                |              |                                                                                                                                                                        |     "tagId": 2                          |
|    |                |              |                                                                                                                                                                        |   }                                     |
|    |                |              |                                                                                                                                                                        | ]                                       |
|    |                |              |                                                                                                                                                                        | exprs:                                  |
|    |                |              |                                                                                                                                                                        | vertex_filter:                          |
|    |                |              |                                                                                                                                                                        | if_track_previous_path: false           |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  1 | IndexScan      | 2            | {                                                                                                                                                                      | outputVar: {                            |
|    |                |              | ver: 0, rows: 0, execTime: 0us, totalTime: 1455us                                                                                                                      |   "colNames": [                         |
|    |                |              | storage_detail: {IndexLimitNode(limit=9223372036854775807):152(us),IndexProjectionNode(projectColumn=[_vid]):150(us),IndexVertexScanNode(IndexID=14, Path=()):151(us)} |     "_vid"                              |
|    |                |              | "127.0.0.1":9779 exec/total: 279(us)/1308(us)                                                                                                                          |   ],                                    |
|    |                |              | }                                                                                                                                                                      |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__IndexScan_1"               |
|    |                |              |                                                                                                                                                                        | }                                       |
|    |                |              |                                                                                                                                                                        | inputVar:                               |
|    |                |              |                                                                                                                                                                        | space: 1                                |
|    |                |              |                                                                                                                                                                        | dedup: false                            |
|    |                |              |                                                                                                                                                                        | limit: 9223372036854775807              |
|    |                |              |                                                                                                                                                                        | filter:                                 |
|    |                |              |                                                                                                                                                                        | orderBy: []                             |
|    |                |              |                                                                                                                                                                        | schemaId: 13                            |
|    |                |              |                                                                                                                                                                        | isEdge: false                           |
|    |                |              |                                                                                                                                                                        | returnCols: [                           |
|    |                |              |                                                                                                                                                                        |   "_vid"                                |
|    |                |              |                                                                                                                                                                        | ]                                       |
|    |                |              |                                                                                                                                                                        | indexCtx: [                             |
|    |                |              |                                                                                                                                                                        |   {                                     |
|    |                |              |                                                                                                                                                                        |     "columnHints": [],                  |
|    |                |              |                                                                                                                                                                        |     "filter": "",                       |
|    |                |              |                                                                                                                                                                        |     "index_id": 14                      |
|    |                |              |                                                                                                                                                                        |   }                                     |
|    |                |              |                                                                                                                                                                        | ]                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------
|  2 | Start          |              | ver: 0, rows: 0, execTime: 0us, totalTime: 20us                                                                                                                        | outputVar: {                            |
|    |                |              |                                                                                                                                                                        |   "colNames": [],                       |
|    |                |              |                                                                                                                                                                        |   "type": "DATASET",                    |
|    |                |              |                                                                                                                                                                        |   "name": "__Start_2"                   |
|    |                |              |                                                                                                                                                                        | }                                       |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------

Wed, 02 Nov 2022 08:16:05 EDT




@wey-gu
Copy link
Member

wey-gu commented Nov 2, 2022

再确认一下 YIELD $p0 是有东西的哈?

@wey-gu
Copy link
Member

wey-gu commented Nov 2, 2022

这里应该有两个问题,索引没数据+优化没走 columnHint。

第一个问题现在不知道是什么情况,请问 profile MATCH (n: account) WHERE n.account.accountUuid == "account001" RETURN n; 能发一下么?
第二个问题一会儿我去提一个 issue 哈

@llinzhe
Copy link
Author

llinzhe commented Nov 2, 2022

profile MATCH (n: account) WHERE n.account.accountUuid == "account001" RETURN n

(root@nebula) [userProfile]> YIELD $p0
+--------------+
| $p0          |
+--------------+
| "account001" |
+--------------+
Got 1 rows (time spent 661/1620 us)

Wed, 02 Nov 2022 10:10:29 EDT

(root@nebula) [userProfile]> profile MATCH (n: account) WHERE n.account.accountUuid == "account001" RETURN n
+----------------------------------------------------------------------------+
| n                                                                          |
+----------------------------------------------------------------------------+
| ("account001" :account{accountUuid: "account001", createTime: 1665368723}) |
+----------------------------------------------------------------------------+
Got 1 rows (time spent 4284/4843 us)

Execution Plan (optimize time 200 us)

-----+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------
| id | name           | dependencies | profiling data                                                                                                                                                                                   | operator info                                    |
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------
|  6 | Project        | 5            | ver: 0, rows: 1, execTime: 68us, totalTime: 69us                                                                                                                                                 | outputVar: {                                     |
|    |                |              |                                                                                                                                                                                                  |   "colNames": [                                  |
|    |                |              |                                                                                                                                                                                                  |     "n"                                          |
|    |                |              |                                                                                                                                                                                                  |   ],                                             |
|    |                |              |                                                                                                                                                                                                  |   "type": "DATASET",                             |
|    |                |              |                                                                                                                                                                                                  |   "name": "__Project_6"                          |
|    |                |              |                                                                                                                                                                                                  | }                                                |
|    |                |              |                                                                                                                                                                                                  | inputVar: __Filter_5                             |
|    |                |              |                                                                                                                                                                                                  | columns: [                                       |
|    |                |              |                                                                                                                                                                                                  |   "$n"                                           |
|    |                |              |                                                                                                                                                                                                  | ]                                                |
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------
|  5 | Filter         | 9            | ver: 0, rows: 1, execTime: 17us, totalTime: 18us                                                                                                                                                 | outputVar: {                                     |
|    |                |              |                                                                                                                                                                                                  |   "colNames": [                                  |
|    |                |              |                                                                                                                                                                                                  |     "n"                                          |
|    |                |              |                                                                                                                                                                                                  |   ],                                             |
|    |                |              |                                                                                                                                                                                                  |   "type": "DATASET",                             |
|    |                |              |                                                                                                                                                                                                  |   "name": "__Filter_5"                           |
|    |                |              |                                                                                                                                                                                                  | }                                                |
|    |                |              |                                                                                                                                                                                                  | inputVar: __Project_4                            |
|    |                |              |                                                                                                                                                                                                  | condition: (n.account.accountUuid=="account001") |
|    |                |              |                                                                                                                                                                                                  | isStable: false                                  |
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------
|  9 | AppendVertices | 7            | {                                                                                                                                                                                                | outputVar: {                                     |
|    |                |              | ver: 0, rows: 1, execTime: 151us, totalTime: 845us                                                                                                                                               |   "colNames": [                                  |
|    |                |              | total_rpc: 762(us)                                                                                                                                                                               |     "n"                                          |
|    |                |              | "127.0.0.1":9779 exec/total: 243(us)/688(us)                                                                                                                                                     |   ],                                             |
|    |                |              | }                                                                                                                                                                                                |   "type": "DATASET",                             |
|    |                |              |                                                                                                                                                                                                  |   "name": "__Project_4"                          |
|    |                |              |                                                                                                                                                                                                  | }                                                |
|    |                |              |                                                                                                                                                                                                  | inputVar: __IndexScan_1                          |
|    |                |              |                                                                                                                                                                                                  | space: 1                                         |
|    |                |              |                                                                                                                                                                                                  | dedup: true                                      |
|    |                |              |                                                                                                                                                                                                  | limit: -1                                        |
|    |                |              |                                                                                                                                                                                                  | filter: account._tag IS NOT EMPTY                |
|    |                |              |                                                                                                                                                                                                  | orderBy: []                                      |
|    |                |              |                                                                                                                                                                                                  | src: $_vid                                       |
|    |                |              |                                                                                                                                                                                                  | props: [                                         |
|    |                |              |                                                                                                                                                                                                  |   {                                              |
|    |                |              |                                                                                                                                                                                                  |     "props": [                                   |
|    |                |              |                                                                                                                                                                                                  |       "accountUuid",                             |
|    |                |              |                                                                                                                                                                                                  |       "createTime",                              |
|    |                |              |                                                                                                                                                                                                  |       "_tag"                                     |
|    |                |              |                                                                                                                                                                                                  |     ],                                           |
|    |                |              |                                                                                                                                                                                                  |     "tagId": 13                                  |
|    |                |              |                                                                                                                                                                                                  |   },                                             |
|    |                |              |                                                                                                                                                                                                  |   {                                              |
|    |                |              |                                                                                                                                                                                                  |     "props": [                                   |
|    |                |              |                                                                                                                                                                                                  |       "token",                                   |
|    |                |              |                                                                                                                                                                                                  |       "_tag"                                     |
|    |                |              |                                                                                                                                                                                                  |     ],                                           |
|    |                |              |                                                                                                                                                                                                  |     "tagId": 5                                   |
|    |                |              |                                                                                                                                                                                                  |   },                                             |
|    |                |              |                                                                                                                                                                                                  |   {                                              |
|    |                |              |                                                                                                                                                                                                  |     "props": [                                   |
|    |                |              |                                                                                                                                                                                                  |       "accountUuid",                             |
|    |                |              |                                                                                                                                                                                                  |       "create_time",                             |
|    |                |              |                                                                                                                                                                                                  |       "_tag"                                     |
|    |                |              |                                                                                                                                                                                                  |     ],                                           |
|    |                |              |                                                                                                                                                                                                  |     "tagId": 2                                   |
|    |                |              |                                                                                                                                                                                                  |   }                                              |
|    |                |              |                                                                                                                                                                                                  | ]                                                |
|    |                |              |                                                                                                                                                                                                  | exprs:                                           |
|    |                |              |                                                                                                                                                                                                  | vertex_filter:                                   |
|    |                |              |                                                                                                                                                                                                  | if_track_previous_path: false                    |
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------
|  7 | IndexScan      | 2            | {                                                                                                                                                                                                | outputVar: {                                     |
|    |                |              | ver: 0, rows: 1, execTime: 0us, totalTime: 1433us                                                                                                                                                |   "colNames": [                                  |
|    |                |              | storage_detail: {IndexLimitNode(limit=9223372036854775807):267(us),IndexProjectionNode(projectColumn=[_vid]):264(us),IndexVertexScanNode(IndexID=15, Path=(accountUuid="account001", )):268(us)} |     "_vid"                                       |
|    |                |              | "127.0.0.1":9779 exec/total: 512(us)/1312(us)                                                                                                                                                    |   ],                                             |
|    |                |              | }                                                                                                                                                                                                |   "type": "DATASET",                             |
|    |                |              |                                                                                                                                                                                                  |   "name": "__IndexScan_1"                        |
|    |                |              |                                                                                                                                                                                                  | }                                                |
|    |                |              |                                                                                                                                                                                                  | inputVar:                                        |
|    |                |              |                                                                                                                                                                                                  | space: 1                                         |
|    |                |              |                                                                                                                                                                                                  | dedup: false                                     |
|    |                |              |                                                                                                                                                                                                  | limit: 9223372036854775807                       |
|    |                |              |                                                                                                                                                                                                  | filter:                                          |
|    |                |              |                                                                                                                                                                                                  | orderBy: []                                      |
|    |                |              |                                                                                                                                                                                                  | schemaId: 13                                     |
|    |                |              |                                                                                                                                                                                                  | isEdge: false                                    |
|    |                |              |                                                                                                                                                                                                  | returnCols: [                                    |
|    |                |              |                                                                                                                                                                                                  |   "_vid"                                         |
|    |                |              |                                                                                                                                                                                                  | ]                                                |
|    |                |              |                                                                                                                                                                                                  | indexCtx: [                                      |
|    |                |              |                                                                                                                                                                                                  |   {                                              |
|    |                |              |                                                                                                                                                                                                  |     "columnHints": [                             |
|    |                |              |                                                                                                                                                                                                  |       {                                          |
|    |                |              |                                                                                                                                                                                                  |         "includeEnd": false,                     |
|    |                |              |                                                                                                                                                                                                  |         "includeBegin": true,                    |
|    |                |              |                                                                                                                                                                                                  |         "endValue": "__EMPTY__",                 |
|    |                |              |                                                                                                                                                                                                  |         "beginValue": "account001",              |
|    |                |              |                                                                                                                                                                                                  |         "scanType": "PREFIX",                    |
|    |                |              |                                                                                                                                                                                                  |         "column": "accountUuid"                  |
|    |                |              |                                                                                                                                                                                                  |       }                                          |
|    |                |              |                                                                                                                                                                                                  |     ],                                           |
|    |                |              |                                                                                                                                                                                                  |     "filter": "",                                |
|    |                |              |                                                                                                                                                                                                  |     "index_id": 15                               |
|    |                |              |                                                                                                                                                                                                  |   }                                              |
|    |                |              |                                                                                                                                                                                                  | ]                                                |
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------
|  2 | Start          |              | ver: 0, rows: 0, execTime: 2us, totalTime: 24us                                                                                                                                                  | outputVar: {                                     |
|    |                |              |                                                                                                                                                                                                  |   "colNames": [],                                |
|    |                |              |                                                                                                                                                                                                  |   "type": "DATASET",                             |
|    |                |              |                                                                                                                                                                                                  |   "name": "__Start_2"                            |
|    |                |              |                                                                                                                                                                                                  | }                                                |
-----+----------------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------

Wed, 02 Nov 2022 10:10:39 EDT

@wey-gu
Copy link
Member

wey-gu commented Nov 3, 2022

我知道了,你有多个索引,索引选择有点问题(问题2),错误的索引没rebuild造成了 row 0 (问题1)

帮看看所有的索引吧,和这个tag 有关的

@wey-gu
Copy link
Member

wey-gu commented Nov 3, 2022

总结:

@llinzhe
Copy link
Author

llinzhe commented Nov 3, 2022

总结:

image

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

ngbatis底层调用的也是这个接口...
hosts地址也保持一致试试?

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

整个上下文环境都是一致的,是在debug模式执行的。

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

session debug结果如下:

现在的现象是我debug进行一次session.executeWithParameter()后,放行该测试方法就可以返回正确的结果。debug与正常执行的差异是 debug后执行的语句没有选择图空间use userProfile;会不会是正常执行的结果其实是use userProfie的结果呢?@wey-gu @CorvusYe

印象中按我之前的测试,多语句会按最后一条语句的结果返回。

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

ngbatis底层调用的也是这个接口...
hosts地址也保持一致试试?

我刚刚这条的想法是会不会是因为访问了hosts里面的不同端口了,不同端口会有差异吗,比如说没有强一致性的问题

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

ngbatis底层调用的也是这个接口...
hosts地址也保持一致试试?

我刚刚这条的想法是会不会是因为访问了hosts里面的不同端口了,不同端口会有差异吗,比如说没有强一致性的问题

嗯嗯 现在看来不是

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

session debug结果如下:

现在的现象是我debug进行一次session.executeWithParameter()后,放行该测试方法就可以返回正确的结果。debug与正常执行的差异是 debug后执行的语句没有选择图空间use userProfile;会不会是正常执行的结果其实是use userProfie的结果呢?@wey-gu @CorvusYe

印象中按我之前的测试,多语句会按最后一条语句的结果返回。

62c9bec2-e309-4605-821f-adf41a66cb2b
0e9f63d6-fdd9-4be8-9fa7-51cb61c7a8e0

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

session debug结果如下:

现在的现象是我debug进行一次session.executeWithParameter()后,放行该测试方法就可以返回正确的结果。debug与正常执行的差异是 debug后执行的语句没有选择图空间use userProfile;会不会是正常执行的结果其实是use userProfie的结果呢?@wey-gu @CorvusYe

印象中按我之前的测试,多语句会按最后一条语句的结果返回。

(root@nebula) [userProfile]> exit


Bye root!
Mon, 07 Nov 2022 05:46:05 EST

[root@localhost ~]# ./nebula-console -addr 127.0.0.1 -port 9669 -u root -p 123

Welcome to Nebula Graph!

(root@nebula) [(none)]> use userProfile;  MATCH (n1: account)-[r: login*2]-( n2: account) WHERE  n1.account.accountUuid ==$p0  RETURN n2.account.accountUuid as accountUuid
+-------------+
| accountUuid |
+-------------+
+-------------+
Empty set (time spent 3684/4189 us)

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

只有debug的时候能有正常的结果是吧,说实话有点费解😂

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

session debug结果如下:

现在的现象是我debug进行一次session.executeWithParameter()后,放行该测试方法就可以返回正确的结果。debug与正常执行的差异是 debug后执行的语句没有选择图空间use userProfile;会不会是正常执行的结果其实是use userProfie的结果呢?@wey-gu @CorvusYe

印象中按我之前的测试,多语句会按最后一条语句的结果返回。

(root@nebula) [userProfile]> exit


Bye root!
Mon, 07 Nov 2022 05:46:05 EST

[root@localhost ~]# ./nebula-console -addr 127.0.0.1 -port 9669 -u root -p 123

Welcome to Nebula Graph!

(root@nebula) [(none)]> use userProfile;  MATCH (n1: account)-[r: login*2]-( n2: account) WHERE  n1.account.accountUuid ==$p0  RETURN n2.account.accountUuid as accountUuid
+-------------+
| accountUuid |
+-------------+
+-------------+
Empty set (time spent 3684/4189 us)

破案了👍👍👍

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

只有debug的时候能有正常的结果是吧,说实话有点费解😂

按照上面我在nebula-console的执行结果,选择图空间应该不能跟目标语句一起执行。

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

hhh 大佬什么时候发布修复版本?

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

今晚或者明天,这种问题优先级必须是最高的呀,添麻烦了,深表歉意哈哈哈

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

今晚或者明天,这种问题优先级必须是最高的呀,添麻烦了,深表歉意哈哈哈

感谢大佬!我这边目前是调研阶段,影响不大~

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

感谢大佬!我这边目前是调研阶段,影响不大~

不分环境,不分阶段,重大问题及时响应才能对得起一声声大佬,不然受之有愧😂😂

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

image
image
image
image
@llinzhe 可能还需要你的协助... 我没复现出来 ... T^T

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

image image image image @llinzhe 可能还需要你的协助... 我没复现出来 ... T^T

你这里是第一次use space吗?

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

你这里是第一次use space吗?

不是的,切换了很多次。这边的断点没过,一直停在这进行的多次查询。
而且语句内也多次切换了 space 没发现问题

@wey-gu
Copy link
Member

wey-gu commented Nov 7, 2022

这个能确定 $p0 的赋值非空对么?

(root@nebula) [(none)]> use userProfile;  MATCH (n1: account)-[r: login*2]-( n2: account) WHERE  n1.account.accountUuid ==$p0  RETURN n2.account.accountUuid as accountUuid
+-------------+
| accountUuid |
+-------------+
+-------------+
Empty set (time spent 3684/4189 us)

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

而且语句内也多次切换了 space 没发现问题

我现在debug都是第一次为:

但是第一次 use space 是必须的,不然会当前 session 会报未指定空间的错。其他的测试第一次的时候写在一起是没有问题的

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

(root@nebula) [(none)]> :param p0 => 'account001';
(root@nebula) [(none)]> yield $p0
+--------------+
| $p0          |
+--------------+
| "account001" |
+--------------+
Got 1 rows (time spent 325/768 us)

Mon, 07 Nov 2022 08:55:32 EST

(root@nebula) [(none)]> use userProfile;  MATCH (n1: account)-[r: login*2]-( n2: account) WHERE  n1.account.accountUuid ==$p0  RETURN n2.account.accountUuid as accountUuid
+-------------+
| accountUuid |
+-------------+
+-------------+
Empty set (time spent 4016/4445 us)

Mon, 07 Nov 2022 08:55:51 EST

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

而且语句内也多次切换了 space 没发现问题

我现在debug都是第一次为:

但是第一次 use space 是必须的,不然会当前 session 会报未指定空间的错。其他的测试第一次的时候写在一起是没有问题的

我这边的现象就是会话还没有选择图空间的时候,使用use space+查询语句就会返回值为空。与nebula-console手动输入的结果一致。所以会不会是nebula目前不支持这样子的操作?@wey-gu @CorvusYe

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

环境是nebula3.3

@wey-gu
Copy link
Member

wey-gu commented Nov 7, 2022

而且语句内也多次切换了 space 没发现问题

我现在debug都是第一次为:

但是第一次 use space 是必须的,不然会当前 session 会报未指定空间的错。其他的测试第一次的时候写在一起是没有问题的

我这边的现象就是会话还没有选择图空间的时候,使用use space+查询语句就会返回值为空。与nebula-console手动输入的结果一致。所以会不会是nebula目前不支持这样子的操作?@wey-gu @CorvusYe

要不要来 nebula repo 报一个 issue? 哈

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

而且语句内也多次切换了 space 没发现问题

我现在debug都是第一次为:

但是第一次 use space 是必须的,不然会当前 session 会报未指定空间的错。其他的测试第一次的时候写在一起是没有问题的

我这边的现象就是会话还没有选择图空间的时候,使用use space+查询语句就会返回值为空。与nebula-console手动输入的结果一致。所以会不会是nebula目前不支持这样子的操作?@wey-gu @CorvusYe

要不要来 nebula repo 报一个 issue? 哈

好的hh

@CorvusYe
Copy link
Collaborator

CorvusYe commented Nov 7, 2022

(root@nebula) [(none)]> :param p0 => 'account001';
(root@nebula) [(none)]> yield $p0
+--------------+
| $p0          |
+--------------+
| "account001" |
+--------------+
Got 1 rows (time spent 325/768 us)

Mon, 07 Nov 2022 08:55:32 EST

(root@nebula) [(none)]> use userProfile;  MATCH (n1: account)-[r: login*2]-( n2: account) WHERE  n1.account.accountUuid ==$p0  RETURN n2.account.accountUuid as accountUuid
+-------------+
| accountUuid |
+-------------+
+-------------+
Empty set (time spent 4016/4445 us)

Mon, 07 Nov 2022 08:55:51 EST

可以先把 $p0 换成普通的文本 'account001' 试试,排除一下参数化。也可以在 debug 的时候也一并试下~

@llinzhe
Copy link
Author

llinzhe commented Nov 7, 2022

use userProfile;  MATCH (n1: account)-[r: login*2]-( n2: account) WHERE  n1.account.accountUuid ==$p0  RETURN n2.account.accountUuid as accountUuid
Welcome to Nebula Graph!

(root@nebula) [(none)]> use userProfile;  MATCH (n1: account)-[r: login*2]-( n2: account) WHERE  n1.account.accountUuid =='account001'  RETURN n2.account.accountUuid as accountUuid
+-------------+
| accountUuid |
+-------------+
+-------------+
Empty set (time spent 3951/4456 us)

CorvusYe added a commit that referenced this issue Nov 25, 2022
fix #78 use space and gql are executed together incorrect in 3.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants