Document says that "O(N) where N is the number of clients already subscribed to a channel"
Does N means the number of clients who subscribing the channel which I want to unsubscribe, or who subscribing any channel?
Document says that "O(N) where N is the number of clients already subscribed to a channel"
Does N means the number of clients who subscribing the channel which I want to unsubscribe, or who subscribing any channel?
2
Answers
It means the sum of all clients subscribed to all the channels you unsubscribe in the batch operation.
UNSUBSCRIBE [channel [channel ...]]
Good question, like @JeanJacquesGourdin said, it is sum of clients of all channels that you are going to unsubscribe. I look into source code of redis 5.0.5, here is what I found, please correct me if I am wrong, thanks in advance
ln = listSearchKey(clients,c);