Open ReasonDuan opened 3 years ago
Cluster模式,在查询页面进行Scan时无法获取到数据。
List<RedisNode> redisMasterNodeList = getRedisMasterNodeList(cluster); int masterSize = redisMasterNodeList.size(); int count = masterSize < 10 ? 100 / masterSize : 10; autoCommandParam.setCount(count); Set<String> result = new LinkedHashSet<>(); redisMasterNodeList.forEach(masterNode -> { RedisClient redisClient = null; try { redisClient = RedisClientFactory.buildRedisClient(masterNode, cluster.getRedisPassword()); Set<String> scanResult = redisClient.scan(autoCommandParam); result.addAll(scanResult); } catch (Exception e) { logger.error("Scan redis failed, node = " + masterNode.getHost() + ":" + masterNode.getPort(), e); } finally { close(redisClient); } });
Cluster模式,在查询页面进行Scan时无法获取到数据。