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. The PR description now explicitly warns existing Standalone and
Sentinel users to grant `EVAL`, `GET`, `SET`, and access to the serialized
cache keys before upgrading. `WATCH`/`MULTI`/`EXEC` permissions alone are
insufficient for `getAndPutIfAbsent` and `replace`.
I verified that behavior against live Redis Software: two NiFi negative
tests required explicit `NOPERM` responses with EVAL denied, then read back the
keys to prove no insertion or replacement occurred. The cache contract also
passed with EVAL allowed and WATCH/MULTI/EXEC excluded, including a separate
mTLS run.
The warning is in the PR description; the component-documentation change and
NIFI-16582/release-note update are still pending and are listed as open
follow-ups.
--
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]