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

TTL-Expired Vertex being queried in GO #2925

Closed
wey-gu opened this issue Sep 24, 2021 · 4 comments
Closed

TTL-Expired Vertex being queried in GO #2925

wey-gu opened this issue Sep 24, 2021 · 4 comments
Assignees
Labels
need to discuss Solution: issue or PR without a clear conclusion on whether to handle it type/bug Type: something is unexpected
Milestone

Comments

@wey-gu
Copy link
Contributor

wey-gu commented Sep 24, 2021

reproduce:

CREATE TAG v_post(id INT NOT NULL, user FIXED_STRING(20) NOT NULL, ts TIMESTAMP);
CREATE TAG v_tag(name FIXED_STRING(29) NOT NULL, ts TIMESTAMP) TTL_DURATION = 30, TTL_COL = "ts";
CREATE EDGE e_tag(ts TIMESTAMP);

INSERT VERTEX v_post(id, user, ts) values "p1001":(1001, "user1", now());
INSERT VERTEX v_tag(name, ts) values "test1":("test1", now());
INSERT VERTEX v_tag(name, ts) values "test2":("test2", now());

INSERT EDGE e_tag(ts) values "p1001"->"test1":(now());
INSERT EDGE e_tag(ts) values "p1001"->"test2":(now());

query after data loaded:

(root@nebula) [basketballplayer]> GO FROM "p1001" OVER e_tag YIELD $$.v_tag.name AS name, $$.v_tag.ts AS ts
+---------+------------+
| name    | ts         |
+---------+------------+
| "test1" | 1632469961 |
+---------+------------+
| "test2" | 1632469962 |
+---------+------------+
Got 2 rows (time spent 68854/108054 us)

Fri, 24 Sep 2021 15:53:29 CST

(root@nebula) [basketballplayer]> MATCH (p:v_post)-[e:e_tag]->(t:v_tag) WHERE id(p) == "p1001" return t.name AS name, t.ts AS ts
+---------+------------+
| name    | ts         |
+---------+------------+
| "test1" | 1632469961 |
+---------+------------+
| "test2" | 1632469962 |
+---------+------------+
Got 2 rows (time spent 56766/90173 us)

Fri, 24 Sep 2021 15:53:30 CST

query after e_tag expired

(root@nebula) [basketballplayer]> MATCH (p:v_post)-[e:e_tag]->(t:v_tag) WHERE id(p) == "p1001" return t.name AS name, t.ts AS ts
+------+----+
| name | ts |
+------+----+
+------+----+
Empty set (time spent 71241/104775 us)

Fri, 24 Sep 2021 15:55:36 CST

(root@nebula) [basketballplayer]> GO FROM "p1001" OVER e_tag YIELD $$.v_tag.name AS name, $$.v_tag.ts AS ts
+------+----+
| name | ts |
+------+----+
|      |    |
+------+----+
|      |    |
+------+----+
Got 2 rows (time spent 30674/62919 us) #<---------------------

Fri, 24 Sep 2021 15:55:38 CST

Shouldn't 0 rows to be returned instead of 2?

@wey-gu wey-gu added the type/bug Type: something is unexpected label Sep 24, 2021
@wey-gu
Copy link
Contributor Author

wey-gu commented Sep 24, 2021

context slack thread by renman

https://nebulagraph.slack.com/archives/CSHN72Z6X/p1632467880001300

@wey-gu wey-gu added the type/question Type: question about the product label Sep 24, 2021
@Sophie-Xie Sophie-Xie added this to the v2.6.0 milestone Sep 26, 2021
@CPWstatic
Copy link
Contributor

This is because of the hanging edges. And the Match / Go have different semantics. You will be more clear by trying this case:

GO FROM "p1001" OVER e_tag YIELD E_TAG._dst, $$.v_tag.name AS name, $$.v_tag.ts AS ts

@CPWstatic
Copy link
Contributor

This is not an easy handled issue.

@Sophie-Xie Sophie-Xie added the need to discuss Solution: issue or PR without a clear conclusion on whether to handle it label Oct 8, 2021
@CPWstatic CPWstatic modified the milestones: v2.6.0, v2.7.0 Oct 11, 2021
@Sophie-Xie Sophie-Xie modified the milestones: v2.7.0, v3.0.0 Oct 15, 2021
@Sophie-Xie Sophie-Xie removed the type/question Type: question about the product label Dec 9, 2021
@critical27
Copy link
Contributor

Fixed in #3535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need to discuss Solution: issue or PR without a clear conclusion on whether to handle it type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

4 participants