Skip removeRecipientViewFromMrmData pipeline if there are no keys

This commit is contained in:
Chris Eager authored and Chris Eager committed 2024-09-06 12:35:03 -05:00
1 parent ad17c6e40d
commit 0602149c52
1 file changed
+4
@@ -472,6 +472,10 @@ public class MessagesCache extends RedisClusterPubSubAdapter<String, String> imp
void removeRecipientViewFromMrmData(final List<byte[]> sharedMrmKeys, final UUID accountUuid,
final byte deviceId) {
if (sharedMrmKeys.isEmpty()) {
return;
}
final Timer.Sample sample = Timer.start();
Flux.fromIterable(sharedMrmKeys)
.collectMultimap(SlotHash::getSlot)