Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.3.2版本集群部署,dubbo修改metadataType后注册实例,注册中心实例元数据未更新 #12194

Closed
kangzhaok opened this issue Jun 7, 2024 · 9 comments

Comments

@kangzhaok
Copy link
Contributor

1、开始dubbo的metadata-type是local,provider启动后注册中心看到实例信息如图

image

dubbo注册信息如下
image

再页面点击下线后,修改metadata-type是remote,
provider启动后注册中心看到实例信息如图
image

dudubbo注册信息如下
image

可能原因
NamingMetadataManager.getInstanceMetadata获取的还是旧的InstanceMetadata
InstanceUtil.updateInstanceMetadata会拿旧的数据,不知道这里设计是否合理

dubbo注册实例是临时节点。

@kangzhaok
Copy link
Contributor Author

如果两次注册时间相隔很久的话这个现象基本就没有了,可能就是集群内该节点的数据没有及时清除。

@bwangll
Copy link

bwangll commented Jun 9, 2024

遇到过这个问题,就是页面修改元数据导致持持久化了,服务无法更新,只要这个服务下线到nacos内部认为过期并删除后,才会恢复正常。目前无解

@bwangll
Copy link

bwangll commented Jun 9, 2024

具体逻辑有一些忘了。可以看一下源码中关于这块的读取逻辑。我记忆中是直接读缓存中的持久化数据了。这个不会被服务注册的数据更新

@KomachiSion
Copy link
Collaborator

请阅读Nacos openAPI中,关于修改实例 部分。

@kangzhaok
Copy link
Contributor Author

请阅读Nacos openAPI中,关于修改实例 部分。

既然实例新注册了为什么不用新注册的元数据二是用持久化的元数据呢?实例的元数据缓存设计是考虑哪点的呢?

@kangzhaok
Copy link
Contributor Author

请阅读Nacos openAPI中,关于修改实例 部分。

我理解缓存只是为了说是保存页面做的修改,也就是主要为了上下线,那是不是新实例注册的时候只用缓存中的上下线属性呢?而不是把缓存中的元数据全部放到新注册的实例里

@KomachiSion
Copy link
Collaborator

KomachiSion commented Jun 17, 2024

所有元数据更新都属于运维操作, 不能被客户端的重新注册覆盖。

@KomachiSion
Copy link
Collaborator

只有客户端自己的覆盖注册才能覆盖由客户端注册的元数据,但是不能覆盖由 更新实例 改动的运维操作

@KomachiSion
Copy link
Collaborator

No more response from author for a long time, and this problem seems usage problem.

@KomachiSion KomachiSion closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants