spring-cloud / spring-cloud/spring-cloud-commons
Why does RefreshScope refresh all beans instead of only refreshing the beans that are dependent on the configuration item? org.springframework.cloud.context.refresh.ContextRefresher#refresh
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 751
- Forks
- 744
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
Is your feature request related to a problem? Please describe.
When I update a particular configuration in Nacos in a production environment with high concurrency, some servers will remain unresponsive for a long time.
Describe the solution you'd like
Update only the properties of the Bean corresponding to the configuration item.
Describe alternatives you've considered
Dispose of the currently associated bean, initialize it directly, and replace the original object reference.
Additional context
org.springframework.cloud.context.refresh.ContextRefresher#refresh
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with org.springframework.cloud.context.refresh.ContextRefresher#refresh and trace the refresh-scope behavior it invokes. Determine how changed configuration properties are associated with beans and what parts of the current refresh affect unrelated beans. Done means the issue has a concrete, validated design for refreshing only affected beans without the reported high-concurrency unresponsiveness.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100