[GitHub] nifi issue #2726: NIFI-4987: Added TTL to RedisDistributedMapCacheClientServ...

2018-05-23 Thread bbende
Github user bbende commented on the issue: https://github.com/apache/nifi/pull/2726 Looks good, merged, thanks! ---

[GitHub] nifi issue #2726: NIFI-4987: Added TTL to RedisDistributedMapCacheClientServ...

2018-05-22 Thread bbende
Github user bbende commented on the issue: https://github.com/apache/nifi/pull/2726 @zenfenan thanks for the updates, I think there is also a small changed needed in putIfAbsent correct? If setnx returns true then set expire? ---

[GitHub] nifi issue #2726: NIFI-4987: Added TTL to RedisDistributedMapCacheClientServ...

2018-05-22 Thread zenfenan
Github user zenfenan commented on the issue: https://github.com/apache/nifi/pull/2726 @bbende I have made the changes. ---

[GitHub] nifi issue #2726: NIFI-4987: Added TTL to RedisDistributedMapCacheClientServ...

2018-05-22 Thread bbende
Github user bbende commented on the issue: https://github.com/apache/nifi/pull/2726 The TTL concept is really specific to the implementation (Redis in this case). From the perspective of the DMC interface, the API for getAndPutIfAbsent is saying it will only do a put if the key wasn't

[GitHub] nifi issue #2726: NIFI-4987: Added TTL to RedisDistributedMapCacheClientServ...

2018-05-21 Thread bbende
Github user bbende commented on the issue: https://github.com/apache/nifi/pull/2726 Was looking into this a little more and I believe we can keep all of the origin getAndPutIfAbsent, and just add the following right after the set: `redisConnection.expire(kv.getKey(), 1000);`

[GitHub] nifi issue #2726: NIFI-4987: Added TTL to RedisDistributedMapCacheClientServ...

2018-05-21 Thread bbende
Github user bbende commented on the issue: https://github.com/apache/nifi/pull/2726 @zenfenan the getAndPutIfAbsent method needs to be an atomic operation which is the reason we are using the watch and multi step operation so we can't remove that ---