Github user bbende commented on the issue:
https://github.com/apache/nifi/pull/2726
Looks good, merged, thanks!
---
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 user zenfenan commented on the issue:
https://github.com/apache/nifi/pull/2726
@bbende I have made the changes.
---
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 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 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
---