Why not implement a lock-free ArrayBucket
Open
kind/question
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
I wonder an implement question about the statics counting :
why not maintain current bucket pointer in a thread, when time of windowLengthInMs elapsed, reset the bucket's value to zero, then there's no need to use lock to lock the bucket anymore.
Contributor guide
Research direction
Start by locating ArrayBucket and reading the statistics-counting path that uses windowLengthInMs and the current bucket pointer. Compare the proposed per-thread reset with the existing synchronization, then establish whether a safe design preserves counting semantics; the issue currently names no files, tests, or acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100