Github user arunmahadevan commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1798#discussion_r92644823
  
    --- Diff: 
external/storm-redis/src/main/java/org/apache/storm/redis/state/RedisKeyValueState.java
 ---
    @@ -161,13 +153,19 @@ public V get(K key, V defaultValue) {
         @Override
         public V delete(K key) {
             LOG.debug("delete key '{}'", key);
    -        String redisKey = encode(keySerializer.serialize(key));
    +        String redisKey = encoder.encodeKey(key);
             V curr = get(key);
    -        pendingPrepare.put(redisKey, TOMBSTONE);
    +        pendingPrepare.put(redisKey, RedisEncoder.TOMBSTONE);
             return curr;
         }
     
         @Override
    +    public Iterator<Map.Entry<K, V>> iterator() {
    +        return new RedisKeyValueStateIterator<K, V>(namespace, 
jedisContainer, 
    --- End diff --
    
    You also need to consider the entries in `pendingPrepare` and 
`pendingCommit`. See the `get` api for example. `RedisKeyValueStateIterator` 
should iterate over pendingPrepare and pendingCommit before iterating over the 
entries in Redis.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to