rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinrongt...@apache.org
Subject [rocketmq] branch develop updated: select a new namesrv when namesrvAddrChoosed not in new addr list
Date Fri, 29 May 2020 15:08:48 GMT
This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3245bd3  select a new namesrv when namesrvAddrChoosed not in new addr list
     new b3ec283  Merge pull request #2043 from wqliang/selectNamesrv
3245bd3 is described below

commit 3245bd3cc604ca7ad30b29eb8469102320478a2d
Author: wqliang <wqliang98@gmail.com>
AuthorDate: Mon May 25 23:59:33 2020 +0800

    select a new namesrv when namesrvAddrChoosed not in new addr list
---
 .../java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
index 415d495..d836c8e 100644
--- a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
+++ b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
@@ -354,6 +354,10 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements
Remoti
                 Collections.shuffle(addrs);
                 log.info("name server address updated. NEW : {} , OLD: {}", addrs, old);
                 this.namesrvAddrList.set(addrs);
+
+                if (!addrs.contains(this.namesrvAddrChoosed.get())) {
+                    this.namesrvAddrChoosed.set(null);
+                }
             }
         }
     }


Mime
View raw message