Cczzzz opened a new issue #3381:
URL: https://github.com/apache/rocketmq/issues/3381


   I run rocket with 
   
   #版本号的方式注册
   forceRegister=false
   #预先设定好的leader
   preferredLeaderId=n0
   
   if i kill the master and leader, n0 will become again leader.
   
   n0's brokerId = 1,not 0.
    Because role change  will not  register again 
   
   
    
   
![image](https://user-images.githubusercontent.com/32947555/134804262-4de63d00-8d30-41cf-88a2-a5cdee596bb2.png)
   
   
   
   BrokerOuterAPI # 281 ,only compare topicConfigWrapper.getDataVersion.
   
     switch (response.getCode()) {
                                   case ResponseCode.SUCCESS: {
                                       QueryDataVersionResponseHeader 
queryDataVersionResponseHeader =
                                           (QueryDataVersionResponseHeader) 
response.decodeCommandCustomHeader(QueryDataVersionResponseHeader.class);
                                       changed = 
queryDataVersionResponseHeader.getChanged();
                                       byte[] body = response.getBody();
                                       if (body != null) {
                                           nameServerDataVersion = 
DataVersion.decode(body, DataVersion.class);
                                           if 
(!topicConfigWrapper.getDataVersion().equals(nameServerDataVersion)) {
                                               changed = true;
                                           }
                                       }
                                       if (changed == null || changed) {
                                           changedList.add(Boolean.TRUE);
                                       }
                                   }
                                   default:
                                       break;
                               }
   
   
   
   
   


-- 
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