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

DefaultConfigManager获取Config加锁,导致无法并发初始化多个不同namespace的Config #29

Closed
zth9 opened this issue Jul 27, 2023 · 2 comments · Fixed by #31
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@zth9
Copy link
Contributor

zth9 commented Jul 27, 2023

你的特性请求和某个问题有关吗?请描述
当应用初始化需要加载多个namespace的Config时,由于DefaultConfigManager加锁,导致无法并发加载,从而导致启动速度过慢。
截屏2023-07-27 17 20 51

清晰简洁地描述一下你希望的解决方案
锁this的初衷,应该是为了避免同一个namespace Config的重复加载。
但这却导致无法同时加载多个不同namespace的Config。

清晰简洁地描述一下这个特性的备选方案
提供ConcurrentLoadConfigManager,以namespace纬度创建Lock,支持并发初始化多个不同namespace的Config

其它背景
暂无

@nobodyiam nobodyiam transferred this issue from apolloconfig/apollo Jul 29, 2023
@nobodyiam nobodyiam added enhancement New feature or request help wanted Extra attention is needed labels Jul 29, 2023
@nobodyiam
Copy link
Member

We'd love to see your suggestions! Feel free to submit a pull request.

zth9 added a commit to zth9/apollo-java that referenced this issue Aug 1, 2023
…config#29)

* Support concurrent loading of Config for different namespaces.

* Supports loading the apollo module through spi
@zth9
Copy link
Contributor Author

zth9 commented Aug 1, 2023

We'd love to see your suggestions! Feel free to submit a pull request.

I submitted a PR, please check it.
#31

zth9 added a commit to zth9/apollo-java that referenced this issue Aug 2, 2023
…config#29)

* Support concurrent loading of Config for different namespaces.

* Supports loading the apollo module through spi
zth9 added a commit to zth9/apollo-java that referenced this issue Aug 2, 2023
…config#29)

* Support concurrent loading of Config for different namespaces.

* Supports loading the apollo module through spi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants