[ 
https://issues.apache.org/jira/browse/STORM-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379082#comment-14379082
 ] 

Jungtaek Lim edited comment on STORM-723 at 3/25/15 1:09 AM:
-------------------------------------------------------------

Actually there's one workaround to accomplish same things.

1. Use Sorted Set instead of Set.
2. Use timestamp which represents "expire time" to score.
3. When all operations about key occur, call zrembyscore with current timestamp 
to remove expired, and call actual requests.

Maybe we should use Lua script from 3. to make it atomic, which seems to be 
more complicated.
So I think we need to confirm we should leave this functionality.


was (Author: kabhwan):
Actually there's one workaround to accomplish same things.

1. Use Sorted Set instead of Set.
2. Use timestamp which represents "expire time" to score.
3. When all operations about key occur, call zrembyscore with current timestamp 
to remove expired, and call actual requests.

Maybe we should use Lua script to make it atomic, which seems to be more 
complicated.
So I think we need to confirm we should leave this functionality.

> [storm-redis] RedisStateSetUpdater writes state into String but calls Set 
> operation
> -----------------------------------------------------------------------------------
>
>                 Key: STORM-723
>                 URL: https://issues.apache.org/jira/browse/STORM-723
>             Project: Apache Storm
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Jungtaek Lim
>            Assignee: Jungtaek Lim
>
> RedisStateSetUpdater writes value into String type, but it tries to retrieve 
> Set's element count from String type which will throw JedisDataException. 
> {code}
>                 if (this.expireIntervalSec > 0) {
>                     jedis.setex(redisKey, expireIntervalSec, value);
>                 } else {
>                     jedis.set(redisKey, value);
>                 }
>                 Long count = jedis.scard(redisKey);
> {code}
> Btw, Redis expire only applies to key, so above implementation seems to be 
> invalid.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to