ferrirW commented on a change in pull request #25:
URL: https://github.com/apache/rocketmq-mqtt/pull/25#discussion_r826537466



##########
File path: 
mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/session/match/MatchAction.java
##########
@@ -120,9 +120,7 @@ public void addSubscription(Session session, 
Set<Subscription> subscriptions) {
             }
 
             synchronized (topicCache) {
-                if (!topicCache.containsKey(topicFilter)) {

Review comment:
       This place is for subscribe request, that will not be frequent, can I 
keep it? @pingww 

##########
File path: 
mqtt-cs/src/main/java/org/apache/rocketmq/mqtt/cs/session/infly/InFlyCache.java
##########
@@ -61,9 +61,7 @@ public void cleanResource(String clientId,String channelId) {
 
     public void put(CacheType cacheType, String channelId, int mqttMsgId) {
         ConcurrentMap<String, Set<Integer>> cache = whichCache(cacheType);
-        if (!cache.containsKey(channelId)) {

Review comment:
       Oh, that's my mistake. I just replaced them all, and don't notice this 
cache operation will be frequent.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to