You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Bernhard Geisberger (Jira)" <ji...@apache.org> on 2021/01/26 13:13:00 UTC
[jira] [Updated] (NIFI-8152) RedisDistributedMapCacheClientService
throws NPE under rare circumstances
[ https://issues.apache.org/jira/browse/NIFI-8152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bernhard Geisberger updated NIFI-8152:
--------------------------------------
Description:
Since our upgrade to NiFi 1.12.1 (we ran 1.8 before), DetectDuplicate throws some rare NullPointerExceptions. It is not reproducible directly with the same flowfiles again.
The stacktrace shows that it is caused by RedisDistributedMapCacheClientService, line 165, where the results of redisConnection.exec() are checked.
Looking at the source code of spring-data-redis, it is actually possible that the exec() call returns null in some error cases, as you can see here:
https://github.com/spring-projects/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java#L482
Update:
I've found out that this is related to a newer version of jedis in the classpath than that was bundled in NiFi. In particular, it was this change: https://github.com/redis/jedis/pull/1368
This is included in all versions after 2.9.0.
Considering this, I think it should be safe to consider the case of a null-response equal to an empty list at the two usages in RedisDistributedMapCacheClientService to allow newer jedis versions.
was:
Since our upgrade to NiFi 1.12.1 (we ran 1.8 before), DetectDuplicate throws some rare NullPointerExceptions. It is not reproducible directly with the same flowfiles again.
The stacktrace shows that it is caused by RedisDistributedMapCacheClientService, line 165, where the results of redisConnection.exec() are checked.
Looking at the source code of spring-data-redis, it is actually possible that the exec() call returns null in some error cases, as you can see here:
https://github.com/spring-projects/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java#L482
I didn't create a pull-request for now as I'm not really sure how to fix this in the best way.
> RedisDistributedMapCacheClientService throws NPE under rare circumstances
> -------------------------------------------------------------------------
>
> Key: NIFI-8152
> URL: https://issues.apache.org/jira/browse/NIFI-8152
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.12.1
> Environment: Custom Docker Image with OpenJDK 11, based on Debian
> Host: Debian Buster
> Reporter: Bernhard Geisberger
> Priority: Minor
>
> Since our upgrade to NiFi 1.12.1 (we ran 1.8 before), DetectDuplicate throws some rare NullPointerExceptions. It is not reproducible directly with the same flowfiles again.
> The stacktrace shows that it is caused by RedisDistributedMapCacheClientService, line 165, where the results of redisConnection.exec() are checked.
> Looking at the source code of spring-data-redis, it is actually possible that the exec() call returns null in some error cases, as you can see here:
> https://github.com/spring-projects/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/connection/jedis/JedisConnection.java#L482
> Update:
> I've found out that this is related to a newer version of jedis in the classpath than that was bundled in NiFi. In particular, it was this change: https://github.com/redis/jedis/pull/1368
> This is included in all versions after 2.9.0.
> Considering this, I think it should be safe to consider the case of a null-response equal to an empty list at the two usages in RedisDistributedMapCacheClientService to allow newer jedis versions.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)