未验证 提交 f1cf643b 编写于 作者: 杨翊 SionYang 提交者: GitHub

Try to fix #4573,#4629. Jraft leader status check error. (#5129)

上级 00032676
......@@ -65,10 +65,10 @@ public class PersistentServiceProcessor extends BasePersistentServiceProcessor {
@Override
public void afterConstruct() {
super.afterConstruct();
this.protocol.addRequestProcessors(Collections.singletonList(this));
this.protocol.protocolMetaData()
.subscribe(Constants.NAMING_PERSISTENT_SERVICE_GROUP, MetadataKey.LEADER_META_DATA,
(o, arg) -> hasLeader = StringUtils.isNotBlank(String.valueOf(arg)));
this.protocol.addRequestProcessors(Collections.singletonList(this));
// If you choose to use the new RAFT protocol directly, there will be no compatible logical execution
if (EnvUtil.getProperty(Constants.NACOS_NAMING_USE_NEW_RAFT_FIRST, Boolean.class, false)) {
NotifyCenter.registerSubscriber(notifier);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册