Skip to content

Commit 034c910

Browse files
committed
Update reset on JedisClusterInfoCache
1 parent 8e60c1b commit 034c910

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/redis/clients/jedis/JedisClusterInfoCache.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,16 @@ public void reset() {
454454
nodes.clear();
455455
Arrays.fill(slots, null);
456456
Arrays.fill(slotNodes, null);
457+
if (clientSideCache != null) {
458+
clientSideCache.flush();
459+
}
460+
if (clientConfig.isReadOnlyForRedisClusterReplicas() && replicaSlots != null) {
461+
for (List<ConnectionPool> replicaList : replicaSlots) {
462+
if (replicaList != null) {
463+
replicaList.clear();
464+
}
465+
}
466+
}
457467
} finally {
458468
w.unlock();
459469
}

0 commit comments

Comments
 (0)