提问参考模版:
如何判断是否设置了TTL 属性,设置之后,desc tag t1 并没有相关描述,在哪里可以看到吗?
···
(root@nebula) [ProdRelation]> desc tag t1
±------±------------±------±--------+
| Field | Type | Null | Default |
±------±------------±------±--------+
| “a” | “timestamp” | “YES” | |
±------±------------±------±--------+
Got 1 rows (time spent 2419/3136 us)
Thu, 12 Aug 2021 15:46:09 CST
···
(root@nebula) [ProdRelation]> fetch prop on test 100 -> 101
+---------------------------------+
| edges_ |
+---------------------------------+
| [:test 100->101 @0 {degree: 2}] |
+---------------------------------+
Got 1 rows (time spent 4030/6053 us)
Thu, 12 Aug 2021 15:57:21 CST
(root@nebula) [ProdRelation]> fetch prop on t1 100
Empty set (time spent 2398/3636 us)
Thu, 12 Aug 2021 15:57:39 CST
刚刚新插入一个1628762261 == 2021-08-12 17:57:41, 现在是ttl_duration= 5
+------+------------------------------------+
| Tag | Create Tag |
+------+------------------------------------+
| "t1" | "CREATE TAG `t1` ( |
| | `a` timestamp NULL |
| | ) ttl_duration = 5, ttl_col = "a"" |
+------+------------------------------------+
Got 1 rows (time spent 2407/3289 us)
fetch prop 还是有值的
我注意到这个问题,ttl_col这个时间为1628763358 == 2021-08-12 18:15:58,
但是console 的时间如下, 开始在想是不是因为这个,但是测试下,过了console 的时间戳也不对
(root@nebula) [ProdRelation]> fetch prop on t1 100
+--------------------------+
| vertices_ |
+--------------------------+
| (100 :t1{a: 1628763358}) |
+--------------------------+
Got 1 rows (time spent 2520/4162 us)
Thu, 12 Aug 2021 18:10:00 CST
下面是整体的case
(root@nebula) [ProdRelation]> create tag Team(create_time timestamp)
Execution succeeded (time spent 36564/37456 us)
Thu, 12 Aug 2021 18:13:07 CST
(root@nebula) [ProdRelation]> alter tag Team ttl_col="create_time", ttl_duration=5
Execution succeeded (time spent 30787/32461 us)
Thu, 12 Aug 2021 18:13:51 CST
(root@nebula) [ProdRelation]> Insert Vertex Team(create_time) values 100:(now())
Execution succeeded (time spent 4878/6171 us)
Thu, 12 Aug 2021 18:14:19 CST
(root@nebula) [ProdRelation]> show create tag Team
+--------+----------------------------------------------+
| Tag | Create Tag |
+--------+----------------------------------------------+
| "Team" | "CREATE TAG `Team` ( |
| | `create_time` timestamp NULL |
| | ) ttl_duration = 5, ttl_col = "create_time"" |
+--------+----------------------------------------------+
Got 1 rows (time spent 2227/3208 us)
Thu, 12 Aug 2021 18:14:30 CST
(root@nebula) [ProdRelation]> fetch prop on Team 100
+--------------------------------------+
| vertices_ |
+--------------------------------------+
| (100 :Team{create_time: 1628763695}) |
+--------------------------------------+
Got 1 rows (time spent 2835/3834 us)
Thu, 12 Aug 2021 18:14:39 CST
(root@nebula) [ProdRelation]>
我知道问题的原因了,你把集群的所有服务机器调成时间一致就好了。
Reid00
2021 年8 月 13 日 02:10
12
我把服务器端的所有时间都调成一致了, 客户端(运行console 的服务器也调成了时间一致)但是还是不行
[root@nebula-test-1 ~]# date
Fri Aug 13 10:08:07 CST 2021
1628820380 == 2021-08-13 10:06:20
(root@nebula) [ProdRelation]> fetch prop on Team 100
+--------------------------------------+
| vertices_ |
+--------------------------------------+
| (100 :Team{create_time: 1628820380}) |
+--------------------------------------+
Got 1 rows (time spent 2595/4378 us)
Fri, 13 Aug 2021 10:08:21 CST
(root@nebula) [ProdRelation]> show create tag Team
+--------+----------------------------------------------+
| Tag | Create Tag |
+--------+----------------------------------------------+
| "Team" | "CREATE TAG `Team` ( |
| | `create_time` timestamp NULL |
| | ) ttl_duration = 5, ttl_col = "create_time"" |
+--------+----------------------------------------------+
Got 1 rows (time spent 2285/3086 us)
Fri, 13 Aug 2021 10:08:29 CST
Reid00:
tag
你应该是graphd和storaged的机器不是一个,你改下改成一致了。重新执行下,就行。
或者你在把graphd和storage的机器放在一台。肯定没有问题。
Reid00
2021 年8 月 13 日 03:36
14
三台机器的集群,每个机器都是graphd 和storaged,应该不是这个原因? 有点奇怪
[root@nebula-test-1 scripts]# ./nebula.service status all
[WARN] The maximum files allowed to open might be too few: 1024
[INFO] nebula-metad: Running as 23090, Listening on 9559
[INFO] nebula-graphd: Running as 23134, Listening on 9669
[INFO] nebula-storaged: Running as 23198, Listening on 9779
这个问题就是graphd和storaged机器时间不一致导致的。你改成一致了。重新测试下。肯定没有问题。
Reid00
2021 年8 月 13 日 06:00
16
三台机器的date 目前是一致的如下。 这个是nebula 的的时区有关系吗?
[root@nebula-test-3 ~]# date
Fri Aug 13 13:56:10 CST 2021
[root@nebula-test-2 ~]# date
Fri Aug 13 13:55:19 CST 2021
[root@nebula-test-1 scripts]# date
Fri Aug 13 13:54:50 CST 2021
Reid00
2021 年8 月 13 日 06:20
17
已经解决,换了test2 的ip连接,发现生效了。
system
关闭
2021 年9 月 12 日 06:20
18
此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。