mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-19 10:54:54 +08:00
Add back haConnectionStateNotificationService to HAService
This commit is contained in:
@@ -87,6 +87,8 @@ Broker若设置enableControllerMode=false,则仍然以之前方式运行。若
|
||||
|
||||
可以带数据进行原地升级,对于每组Broker,停机主、备Broker,**保证主、备的Commitlog对齐**(可以在升级前禁写该组Broker一段时间,或则通过拷贝方式保证一致),升级包后重新启动即可。
|
||||
|
||||
> 若主备commitlog不对齐,需要保证主上线以后再上线备,否则可能会因为数据截断而丢失消息。
|
||||
|
||||
(2)原DLedger模式升级到Controller切换架构
|
||||
|
||||
由于原DLedger模式消息数据格式与Master-Slave下数据格式存在区别,不提供带数据原地升级的路径。在部署多组Broker的情况下,可以禁写某一组Broker一段时间(只要确认存量消息被全部消费即可,比如根据消息的保存时间来决定),然后清空store目录下除config/topics.json、subscriptionGroup.json下(保留topic和订阅关系的元数据)的其他文件后,进行空盘升级。
|
||||
@@ -116,7 +116,8 @@ public class NamesrvController {
|
||||
this.controller = new DLedgerController(controllerConfig, this.routeInfoManager::isBrokerAlive,
|
||||
controllerNettyServerConfig, this.nettyClientConfig, this.brokerHousekeepingService);
|
||||
this.routeInfoManager.setController(this.controller);
|
||||
} catch (final CloneNotSupportedException ignored) {
|
||||
} catch (final CloneNotSupportedException e) {
|
||||
LOGGER.warn("", e);
|
||||
}
|
||||
}
|
||||
this.configuration = new Configuration(
|
||||
|
||||
@@ -69,6 +69,7 @@ public class AutoSwitchHAService extends DefaultHAService {
|
||||
this.defaultMessageStore = defaultMessageStore;
|
||||
this.acceptSocketService = new AutoSwitchAcceptSocketService(defaultMessageStore.getMessageStoreConfig().getHaListenPort());
|
||||
this.groupTransferService = new GroupTransferService(this, defaultMessageStore);
|
||||
this.haConnectionStateNotificationService = new HAConnectionStateNotificationService(this, defaultMessageStore);
|
||||
}
|
||||
|
||||
@Override public void shutdown() {
|
||||
|
||||
Reference in New Issue
Block a user