mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 09:47:58 +01:00
Fixed a poorly-mirrored write operation to the new cluster.
This commit is contained in:
committed by
Jon Chambers
parent
a0bebca1e6
commit
17cfd4924c
@@ -181,18 +181,16 @@ public class UsernamesManager {
|
||||
final String uuidMapKey = getUuidMapKey(uuid);
|
||||
|
||||
redisGet(uuid).ifPresent(username -> {
|
||||
jedis.del(getUsernameMapKey(username));
|
||||
final String usernameMapKey = getUsernameMapKey(username);
|
||||
|
||||
jedis.del(usernameMapKey);
|
||||
jedis.del(uuidMapKey);
|
||||
});
|
||||
|
||||
cacheCluster.useWriteCluster(connection -> {
|
||||
final RedisAdvancedClusterAsyncCommands<String, String> asyncCommands = connection.async();
|
||||
cacheCluster.useWriteCluster(connection -> {
|
||||
final RedisAdvancedClusterAsyncCommands<String, String> asyncCommands = connection.async();
|
||||
|
||||
asyncCommands.get(uuidMapKey).thenAccept(username -> {
|
||||
if (username != null) {
|
||||
asyncCommands.del(getUsernameMapKey(username));
|
||||
asyncCommands.del(uuidMapKey);
|
||||
}
|
||||
asyncCommands.del(usernameMapKey);
|
||||
asyncCommands.del(uuidMapKey);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user