[ 
https://issues.apache.org/jira/browse/NIFI-5795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16706890#comment-16706890
 ] 

ASF GitHub Bot commented on NIFI-5795:
--------------------------------------

Github user pvillard31 commented on the issue:

    https://github.com/apache/nifi/pull/3135
  
    Confirmed the reported issue and confirmed the fix. Merging to master, 
thanks @luup2k 


> RedisDistributedMapCacheClientService put missing option
> --------------------------------------------------------
>
>                 Key: NIFI-5795
>                 URL: https://issues.apache.org/jira/browse/NIFI-5795
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Alex
>            Priority: Major
>
> When you select on *PutDistributedMapCache CACHE_UPDATE_STRATEGY = 
> CACHE_UPDATE_REPLACE we execute "cache.put(cacheKey, cacheValue, 
> keySerializer, valueSerializer);"* 
> [LINK|https://github.com/apache/nifi/blob/ea9b0db2f620526c8dd0db595cf8b44c3ef835be/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutDistributedMapCache.java#L202]
> If you use redis as backend service this jumps to: 
> RedisDistributedMapCacheClientService.java -> 
> redisConnection.set(kv.getKey(), kv.getValue(), Expiration.seconds(ttl), 
> null); 
> [LINK|https://github.com/apache/nifi/blob/ea9b0db2f620526c8dd0db595cf8b44c3ef835be/nifi-nar-bundles/nifi-redis-bundle/nifi-redis-extensions/src/main/java/org/apache/nifi/redis/service/RedisDistributedMapCacheClientService.java#L191]
> Calling to spring-data/redis/ library, but we have a bug putting null as 
> Option parameter, causing an error "option cannot be null", because according 
> to library: "{{option}} - must not be null." [Library 
> Link|https://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/connection/RedisStringCommands.html#set-byte:A-byte:A-org.springframework.data.redis.core.types.Expiration-org.springframework.data.redis.connection.RedisStringCommands.SetOption-]
> If we want to update strategy we should use: 
> [{{RedisStringCommands.SetOption.upsert()}}|https://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/connection/RedisStringCommands.SetOption.html#upsert--]
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to