老师啊,
-
第二节zoom课提到redis ttl 不能直接fail value, 只能直接fail key, 这里没听懂?是说如果一个key 超过ttl没更新,redis 可以删,但是value 不行,对嘛?
-
课上给出的做法是只取geohash corresponding 最近的几个(Driver ID, TS)?
-
Driver Location y 也是存在redis里吗?
谢谢
老师啊,
第二节zoom课提到redis ttl 不能直接fail value, 只能直接fail key, 这里没听懂?是说如果一个key 超过ttl没更新,redis 可以删,但是value 不行,对嘛?
课上给出的做法是只取geohash corresponding 最近的几个(Driver ID, TS)?
Driver Location y 也是存在redis里吗?
谢谢
我说的是 Expire,不是 Fail。这里特指 Redis Sorted Set,不能单独 expire set 当中一个 element。
取所有的30秒内的。
是的
“我说的是 Expire,不是 Fail。这里特指 Redis Sorted Set,不能单独 expire set 当中一个 element。”
对不起,还是没懂,
对于Driver by Geohash table, key = Geohash, value = sorted set(Driver ID, TS)
If we found that the latest cureent_time_TS > TTL, we delete the value and the corresponding key together? correct? TTL = 30 seconds
那什么时候fail the whole set? how often do we check the value of each key = Geohash?
Thanks,
只删除 driver id 和 TS 数据,不删除 Key。因为一个 Key 里有很多个 (driver id, TS) pair。每个 pair 单独删除。
我不明白 “Fail the whole set” 是什么意思。你应该指的是 expire whole set。我们不会 expire whole set。每次查询用户周围有哪些司机的时候会用 Geohash 查询。