Skip to content

Commit

Permalink
fix redis mget
Browse files Browse the repository at this point in the history
  • Loading branch information
shanwb committed May 10, 2024
1 parent b3f1cc8 commit 6472c72
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
16 changes: 15 additions & 1 deletion jcommon/redis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<version>1.6.0-jdk21-SNAPSHOT</version>
</parent>
<artifactId>redis</artifactId>
<version>2.0-jdk20-SNAPSHOT</version>
<version>2.0-jdk21-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
Expand Down Expand Up @@ -37,4 +37,18 @@
<version>3.8.1</version>
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>central</id>
<name>maven-release-virtual</name>
<url>https://pkgs.d.xiaomi.net/artifactory/maven-release-virtual</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>maven-snapshot-virtual</name>
<url>https://pkgs.d.xiaomi.net/artifactory/maven-snapshot-virtual</url>
</snapshotRepository>
</distributionManagement>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ public String get(String key) {
}

public Map<String, String> mget(final List<String> keys) {
boolean success = true;
try {
if (serverType.equals("dev")) {
Map<String, String> result = new HashMap<>();
Expand All @@ -224,7 +223,6 @@ public Map<String, String> mget(final List<String> keys) {
return cluster.mget(keys);
}
} catch (Exception e) {
success = false;
throw e;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ private Map<JedisPool, List<String>> getPoolKeyMap(List<String> keys) {
Map<JedisPool, List<String>> poolKeysMap = new LinkedHashMap<JedisPool, List<String>>();
try {
Field field = JedisClusterConnectionHandler.class.getDeclaredField("cache");
field.setAccessible(true);
for (String key : keys) {
JedisPool jedisPool;
int slot = JedisClusterCRC16.getSlot(key);
Expand Down

0 comments on commit 6472c72

Please sign in to comment.