Peter Kimberley created NIFI-11945:
--------------------------------------

             Summary: DeduplicateRecord does not add keys to distributed map 
cache
                 Key: NIFI-11945
                 URL: https://issues.apache.org/jira/browse/NIFI-11945
             Project: Apache NiFi
          Issue Type: Bug
          Components: Core Framework
    Affects Versions: 1.23.0
         Environment: Docker
            Reporter: Peter Kimberley


The `DeduplicateRecord` processor supports the use of a distributed map cache 
(DMC).

After generating the record key, it checks for the existence of that key in the 
cache. It then calls `DistributedMapCacheClientWrapper::put()`, which in this 
case, is a noop. Therefore, a cache entry is never written and records are 
always routed to the `non-duplicate` relationship.

The correct behaviour would be for 
`DistributedMapCacheClientWrapper:contains()` to call 
`DistributedMapCacheClient::putIfAbsent()`, which would atomically check/set 
the key in the target cache.

An additional problem is a NPE where a DMC is used and the `DeduplicateRecord` 
property `Record Hashing Algorithm` is set to `NONE`.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to