exceptionfactory commented on code in PR #7603:
URL: https://github.com/apache/nifi/pull/7603#discussion_r1302004363
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/DeduplicateRecord.java:
##########
@@ -625,40 +609,17 @@ public
DistributedMapCacheClientWrapper(DistributedMapCacheClient client) {
@Override
public boolean contains(String value) {
try {
- return client.containsKey(value, STRING_SERIALIZER);
+ return !client.putIfAbsent(value, "", STRING_SERIALIZER,
STRING_SERIALIZER);
Review Comment:
Thanks for the additional background @p-kimberley. Reviewing this change in
comparison with `DetectDuplicate`, it seems like this change in behavior should
include an optional property. The previous comment in the `put()` method
indicates that the Distributed Map Cache should not be updated in this
Processor. If we added a new Boolean property to control cache updates, which
depended on the presence of the Distributed Map Cache Service, then that seems
like a reasonable way forward.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]