JeremyXin commented on code in PR #9869:
URL: https://github.com/apache/seatunnel/pull/9869#discussion_r2358095879


##########
seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/JedisWrapper.java:
##########
@@ -82,6 +89,48 @@ public List<String> zrange(final String key, final long 
start, final long stop)
         return jedisCluster.zrange(key, start, stop);
     }
 
+    @Override
+    public String info() {

Review Comment:
   It turns out that when writing to set type data, the `batchWriteSet` method 
of `RedisClusterClient` class:`RedisDataType'.SET.set(this,...) `. The passed 
jedis object is `this`, but this jedis object actually did not initialize the 
`Connection` connection, which led to the error #9865. The actual jedis object 
that should be used is the Jedis object passed in from the constructor.
   
   The `info` method rewritten in `JedisWrapper` is designed to support 
querying redis version information in cluster mode. The `edisWrapper` class 
inherits from the `Jedis` class, but does not initialize the `Connection` 
object of the parent class. Therefore, the execution of all Jedis-related 
methods should go through `JedisCluster`. Instead of executing the methods in 
the parent class Jedis (all of which will result in execution errors due to the 
`Connection` not being initialized).



-- 
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]

Reply via email to