alberttwong commented on code in PR #11919:
URL: https://github.com/apache/nifi/pull/11919#discussion_r4617156033
##########
nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/src/main/java/org/apache/nifi/redis/service/RedisDistributedMapCacheClientService.java:
##########
@@ -18,49 +18,73 @@
import org.apache.nifi.annotation.documentation.CapabilityDescription;
import org.apache.nifi.annotation.documentation.Tags;
-import org.apache.nifi.components.ValidationContext;
-import org.apache.nifi.components.ValidationResult;
import org.apache.nifi.distributed.cache.client.AtomicCacheEntry;
import
org.apache.nifi.distributed.cache.client.AtomicDistributedMapCacheClient;
import org.apache.nifi.distributed.cache.client.Deserializer;
import org.apache.nifi.distributed.cache.client.Serializer;
-import org.apache.nifi.redis.RedisConnectionPool;
-import org.apache.nifi.redis.RedisType;
+import org.apache.nifi.util.Tuple;
+import org.springframework.data.redis.connection.ReturnType;
+import org.springframework.data.redis.connection.SetCondition;
+import org.springframework.data.redis.core.types.Expiration;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-
-import static org.apache.nifi.redis.util.RedisUtils.REDIS_CONNECTION_POOL;
+import java.nio.charset.StandardCharsets;
@Tags({ "redis", "distributed", "cache", "map" })
-@CapabilityDescription("An implementation of DistributedMapCacheClient that
uses Redis as the backing cache. This service relies on " +
- "the WATCH, MULTI, and EXEC commands in Redis, which are not fully
supported when Redis is clustered. As a result, this service " +
- "can only be used with a Redis Connection Pool that is configured for
standalone or sentinel mode. Sentinel mode can be used to " +
- "provide high-availability configurations.")
+@CapabilityDescription("An implementation of AtomicDistributedMapCacheClient
that uses Redis as the backing cache, including " +
Review Comment:
Agreed. This changes the required ACL permissions for existing Standalone
and Sentinel deployments too. The migration note should explicitly tell users
to grant `EVAL` before upgrading, along with `GET` and `SET` and access to the
cache keys used by the scripts. Allowing `WATCH`/`MULTI`/`EXEC` alone will no
longer be sufficient for `getAndPutIfAbsent` and `replace`. I'll include that
warning in the component documentation and add it to NIFI-16582 for
release-note visibility.
--
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]