[Improvement] Sleep with lock held in ShuffleTaskManager
- Dominant language
- Java
- Stars
- 454
- Forks
- 172
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 5
Description
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [X] I have searched in the [issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and found no similar issues.
### What would you like to be improved?
Sleep at line 257 with lock held:
https://github.com/apache/incubator-uniffle/blob/24ea73cf8b4d9a9a270bd2ca798b571a2b8b4917/server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java#L235-L269
### How should we improve?
Can we avoid polling here?
For example: use `lock.await()`.
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Contributor guide
Research direction
Start in server/src/main/java/org/apache/uniffle/server/ShuffleTaskManager.java, around lines 235-269, and trace the lock handling around the sleep at line 257. Review how the surrounding task-management logic waits and what condition it polls. Done means avoiding polling while the lock is held without changing the manager's waiting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100