You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tubemq.apache.org by go...@apache.org on 2020/09/30 11:05:45 UTC

[incubator-tubemq] branch master updated: [TUBEMQ-366] Found a nullpointerexception bug in broker (#280)

This is an automated email from the ASF dual-hosted git repository.

gosonzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git


The following commit(s) were added to refs/heads/master by this push:
     new 4780c29  [TUBEMQ-366] Found a nullpointerexception bug in broker (#280)
4780c29 is described below

commit 4780c29148318fa46dfef1ce531dc1ec30c03cc1
Author: gosonzhang <46...@qq.com>
AuthorDate: Wed Sep 30 19:05:37 2020 +0800

    [TUBEMQ-366] Found a nullpointerexception bug in broker (#280)
    
    Co-authored-by: gosonzhang <go...@tencent.com>
---
 .../java/org/apache/tubemq/server/broker/BrokerServiceServer.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerServiceServer.java b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerServiceServer.java
index 17980fe..f9b242f 100644
--- a/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerServiceServer.java
+++ b/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerServiceServer.java
@@ -835,8 +835,9 @@ public class BrokerServiceServer implements BrokerReadService, BrokerWriteServic
             String reqSessionKey = request.hasSessionKey() ? request.getSessionKey() : null;
             int reqQryPriorityId = request.hasQryPriorityId()
                     ? request.getQryPriorityId() : TBaseConstants.META_VALUE_UNDEFINED;
-            consumerRegisterMap.put(partStr, new ConsumerNodeInfo(storeManager, reqQryPriorityId,
-                    clientId, filterCondSet, reqSessionKey, reqSessionTime, true, partStr));
+            consumerNodeInfo = new ConsumerNodeInfo(storeManager, reqQryPriorityId,
+                    clientId, filterCondSet, reqSessionKey, reqSessionTime, true, partStr);
+            consumerRegisterMap.put(partStr, consumerNodeInfo);
             heartbeatManager.regConsumerNode(getHeartbeatNodeId(clientId, partStr), clientId, partStr);
             MessageStore dataStore = null;
             try {