spring-cloud / spring-cloud/spring-cloud-commons
Set Timeout for Read/Write Locks in RefreshScope
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.
The current refreshScope process controls refresh operations using read/write locks, but there is no timeout set. If the lifecycle function of a bean takes a very long time to execute, it can lead to prolonged blocking during the refresh process or when obtaining the bean, without any related log messages.
Describe the solution you'd like
Is it possible to set a timeout for the lock? If so, could I try submitting a PR for this?
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 by locating RefreshScope and its read/write lock usage, then inspect how long-running bean lifecycle work can block refresh and bean acquisition. Define the timeout and logging behavior, add coverage for blocked operations, and verify that refresh and bean access report the timeout as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100