Github user javajefe commented on a diff in the pull request:
https://github.com/apache/nifi/pull/3176#discussion_r234459335
--- Diff:
nifi-nar-bundles/nifi-redis-bundle/nifi-redis-extensions/src/main/java/org/apache/nifi/redis/service/RedisDistributedMapCacheClientService.java
---
@@ -188,7 +189,7 @@ public void onDisabled() {
public <K, V> void put(final K key, final V value, final Serializer<K>
keySerializer, final Serializer<V> valueSerializer) throws IOException {
withConnection(redisConnection -> {
final Tuple<byte[],byte[]> kv = serialize(key, value,
keySerializer, valueSerializer);
- redisConnection.set(kv.getKey(), kv.getValue(),
Expiration.seconds(ttl), null);
+ redisConnection.set(kv.getKey(), kv.getValue(),
Expiration.seconds(ttl), RedisStringCommands.SetOption.UPSERT);
--- End diff --
Youâre right, this solves NPE you âll see disregarding to the rest of
changes. But as the root cause of the issue is the same (migration to newer
version of Spring Data Redis 2.x) and the result of RedisUtils fix is
incomplete (you canât use non-localhost standalone Redis) Iâve decided to
fix it in the same patch.
---