Skip to content

nacso config服务端缓存与数据库无法同步问题 #13280

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

Open
Nachtflug opened this issue Apr 21, 2025 · 2 comments
Open

nacso config服务端缓存与数据库无法同步问题 #13280

Nachtflug opened this issue Apr 21, 2025 · 2 comments

Comments

@Nachtflug
Copy link

Describe the bug
配置中心服务端grpc 配置信息缓存因数据库操作超时没有同步。客户端进行cas更新时,通过Sdk获取到的永远是上一个版本的数据,后续cas更新无法成功。

Expected behavior
cas更新时能够从服务端获取到最新的配置数据。
服务端缓存能及时更新。

Actually behavior
cas更新时无法从服务端获取到最新的配置数据。

How to Reproduce
Steps to reproduce the behavior:

  1. nacos和数据库间注入网络延迟,或者其他方式使回包变慢但实际数据库操作成功。

Image

  1. 客户端尝试不断cas更新相同data-id(先通过sdk向服务端读最新数据,计算md5,再更新配置),则一直报md5乐观锁不一致。
    Desktop (please complete the following information):
  • OS: Centos 7
  • Version nacos-server 2.3.2, nacos-client 2.4.2
  • Module config
  • SDK official nacos java sdk

Additional context

Image
是不是数据库拉到dataid的时候也尝试更新一把缓存

@kangzhaok
Copy link
Contributor

有个定时任务会定时dumpAll的,最终缓存和数据库都会一致。

@kangzhaok
Copy link
Contributor

有个定时任务会定时dumpAll的,最终缓存和数据库都会一致。

config-server.log有dump All的日志,config-dump.log有通过事件dump的日志

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants