You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by di...@apache.org on 2020/02/12 07:08:57 UTC

[rocketmq-client-go] branch native updated: feat(nameserver): correct impl of UpdateTopicRouteInfo (#406)

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

dinglei pushed a commit to branch native
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/native by this push:
     new 683c9ac  feat(nameserver): correct impl of UpdateTopicRouteInfo (#406)
683c9ac is described below

commit 683c9ac161e5b82a94517dec66ffc3933b6017d7
Author: xujianhai666 <52...@users.noreply.github.com>
AuthorDate: Wed Feb 12 15:08:51 2020 +0800

    feat(nameserver): correct impl of UpdateTopicRouteInfo (#406)
    
    default Topic is extra for UpdateTopicRouteInfo, and will cause incorrect config to retry topic.
    
    Closes #404
---
 internal/route.go | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/internal/route.go b/internal/route.go
index 181ebe9..d3a5f01 100644
--- a/internal/route.go
+++ b/internal/route.go
@@ -118,13 +118,10 @@ func (s *namesrvs) UpdateTopicRouteInfo(topic string) (*TopicRouteData, bool) {
 
 	routeData, err := s.queryTopicRouteInfoFromServer(topic)
 	if err != nil {
-		routeData, err = s.queryTopicRouteInfoFromServer(defaultTopic)
-		if err != nil {
-			rlog.Warning("query topic route from server error", map[string]interface{}{
-				rlog.LogKeyUnderlayError: err,
-			})
-			return nil, false
-		}
+		rlog.Warning("query topic route from server error", map[string]interface{}{
+			rlog.LogKeyUnderlayError: err,
+		})
+		return nil, false
 	}
 
 	if routeData == nil {